Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Field dependency issue

Highlighted
Phanishwar
Collector

Field dependency issue

Hi,

I have a field F1 under Project Detail section .It's auto compelete list. It's Multi select too.

I create a request from the Project WF step..This request has another Field F2(Multi select , ACL) .F2 is dependent on F1 ...I want F2 should not show values those are selected in F1 field on project detail section. I tried using the Token of F1 in the query of F2..it's fine for single select..however it is not working for Multi select..We need muti select F1 and F2 both...


F1 and F2 has value for example A, B , C.if A, and B are selected in F1..then it F2 should have only C value to select for example....



Thanks,
Phani
8 REPLIES
Mahen M
Honored Contributor

Re: Field dependency issue

Hi Phani,
In your request, kindly create a hidden field which shows the values of F1, From this hidden field, with the help of 'Apply on Field Change' update F2.

Can you share the SQL?

Regards,
Mahendran M
Phanishwar
Collector

Re: Field dependency issue

One of field is on Porject form and another on Request Form...how can we make dependent two fields when they are not on the same request type....
Sascha Mohr
Esteemed Contributor

Re: Field dependency issue

Hello Phani,
you will need to create a custom SQL validation in the second request type that filters for you. This could something like this:

SELECT lookup_code
, meaning
, lookup_code
FROM knta_lookups
WHERE lookup_type = ORIGINAL_VALIDATION'
and enabled_flag = 'Y'
and UPPER(meaning) like UPPER('?%')
and (meaning like upper(substr('?',1,1)) || '%'
or meaning like lower(substr('?',1,1)) || '%')
and lookup_code not in
(select parameterXX from kcrt_request_details/kcrt_req_header_details where request_id = REQUEST_ID_FROM_PROJECT)

hth
Mahen M
Honored Contributor

Re: Field dependency issue

Select
decode('[REQD.VP.TEST1]','A','B#@#C'),
decode('[REQD.VP.TEST1]','A','B#@#C')
decode('[REQD.VP.TEST1]','A#@#C','C')
from dual

The above decode works....

Regards,
Mahendran M
Phanishwar
Collector

Re: Field dependency issue

ok..

I am trying for fields on the same request type then my query is :

SELECT lookup_code, meaning FROM knta_lookups WHERE lookup_type = 'CATO - Impacted Theater List' and enabled_flag = 'Y' AND meaning not in ( '[REQD.VP.IMPACTED_THEATERS.TO_STRING]')
and UPPER(meaning) like UPPER('?%') and (meaning like upper(substr('?',1,1)) || '%' or meaning like lower(substr('?',1,1)) || '%') order by seq..

I am getting token is not unparseable....

why to_sting is supporting if both fields are on same req type
Mahen M
Honored Contributor

Re: Field dependency issue

Sorry, a SQL should have only 2 parameters for a single dependency.

Select
decode('[REQD.VP.TEST1]','A','B#@#C','A#@#C','B'),
decode('[REQD.VP.TEST1]','A','B#@#C''A#@#C','B') from Dual

You should have to add additional parameters

Regards,
Mahendran M
Mahen M
Honored Contributor

Re: Field dependency issue

The Hidden field in your Request should have the same 'Token Name' and same 'Validation'(Atleast validation with same values) for the value to copy from project to Request.

Is the decode not working for you?

Regards,
Mahendran M
Jason Nichols K
Honored Contributor

Re: Field dependency issue

You said the field was in the Project Detail section? If that's the case, you should use REQ.P. instead of REQD.P. The OOTB Project Detail is in the Request Header Type, not in the Request Type. This may be why your token is not parsing.
//Add this to "OnDomLoad" event