choice list dependent on a reference field

washij
Kilo Explorer

Hi SN Community,

I have a requirement to track additional detail in timesheets and I'm unsure of the best way to go about it.

In 'task_time_worked' table, I have two reference field to populate the users name and team from the sys_user table and then a type (u_type) and sub-type (u_sub_type) choice list.

Each team has different 'Support' and 'Admin' type activities, so I wanted to populate the sub-type list with selections only applicable to each team.


For example, the helpdesk would have Hardware Support as a sub-type, but a developer would have Data Update Script.


Any assistance would be greatly appreciated.


Kind Regards,

Joel

4 REPLIES 4

postwick
Giga Expert

Go into the Dictionary for the second field and set it to be dependent upon the reference field.   To set the choices, go to the form, select a team, then right-click the sub-type field and edit the choices.   You'll have to do this for each team value.


Thanks Paul.   Tried, but no luck - it just lists all choices.   So I went in to the choice list and manually put in the dependent value against each option and I get nothing .   I think I will run in to issues doing it this way anyway, if someone then selects type 'Admin' the sub-type needs to change as well, so there is a dependency on the type (u_type) field as well as the team field.



Would this be easiser to script somehow?



Other option is to create a Support sub-type and a Admin sub-type field that will display/hide depending on the selection of the type field.   That way - if I can just get the dependency working - I can make both dependent on team and just control their visibility.



Or am I over complicating this?!! lol.   Appreciate any input


Hi Paul,



Apologies for not updating this - no execuse!



Realised that the dependent field was dot walking off another table (not the source table) and it did not like that.



After ensuring the reference field was pointing at the right table, and using a reference qualifier, I was able to get this working similarly to your advice.



I appreciate you taking the time to assist.



Cheers,


Joel


I have a similar issue whereby my reference field is a Dot walked field on the Story table. here is my scenario.



On the Story table, I have a dot walked reference field call Theme (scrum_theme). I have created a Choice List field below it called Application which is dependent on Theme. the Dependency works BUT ONLY when the form is saved first.



For example, if the Theme is Workspace, the Application are   Windows XP, Dell Laptop etc. but if I change the Theme to Data Center, the Application still shows Windows XP and Dell Laptop until I save the form and then it shows the correct Application.



I am not using any Reference Qualifier.



What would be the best way to resolve it so that it works before saving it.