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

Values of 1 field become validation list of another field

Highlighted
Raka_1
Collector

Values of 1 field become validation list of another field

Hi,

There are 2 fields, field 1 is a multi select field and has value A; B; C now how can make this as the validation list of another field I mean in field 2 be a drop down or autocomplete Sql validation and shows validation value as
A
B
C
2 REPLIES
Jason Nichols K
Honored Contributor

Re: Values of 1 field become validation list of another field

Raka,

I'm going to assume that you have a Validation already created for the first field. For the sake of getting you an answer, I'm going to use a validation named 'JN Values (all)'. Let's also assume the Tokens for the two fields are P_FIELD_ONE and P_FIELD_TWO. For the second field, you will need to create a new validation with the following SQL:

SELECT LOOKUP_CODE, MEANING from KNTA_LOOKUPS_NLS
WHERE LOOKUP_TYPE = 'JN Values (all)'
AND INSTR('#@#' || '[REQD.P.P_FIELD_ONE]' || '#@#', '#@#' || LOOKUP_CODE || '#@#') > 0

This code will allow for the first field to have 1 or more values in it. Hope this helps.

Jason
Raka_1
Collector

Re: Values of 1 field become validation list of another field

Jason Thanks for the Response. This certainly helps me to move in the right direction. I was able to satisfy this requirement by writing a function. But this approach is what I was looking earlier and going to implement this one only.

Thanks
//Add this to "OnDomLoad" event