The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to have a field's drop down set of values change based on another field's value?

Highlighted
CoxPMO
Occasional Advisor

Is there a way to have a field's drop down set of values change based on another field's value?

Hello,  I see how I can default a field value based on another field's selection.   Is there a way to limit the drop down list as well?  For example, if Category = "A", the sub-category can be 1, 2 or 3.  If Category=B, then sub-category can be 4 or 5, etc.  Thank you!

1 REPLY
Jim Esler
Honored Contributor

Re: Is there a way to have a field's drop down set of values change based on another field's value?

We have used the Description field in dropdown entries to specify filters for a custom validation. The validation then uses the token for the controlling field to pick entries from the second field's validation. The sql for the second validation looks like:

 

select lookup_code, meaning
FROM knta_lookups
where description like '%[REQD.P.FIRST_FIELD]%'
and lookup_type = '<second list name>'

and enabled_flag = 'Y'
order by seq

 

An alternative would be to use the hidden value of the first field as the name (i.e., lookup_type) of the second list.

//Add this to "OnDomLoad" event