Reference field advanced reference qualifier

davilu
Mega Sage

I have two reference fields on a form, a column called Workflow (referencing the wf_workflow table) and another column called Workflow Stage (referencing wf_stage table).   I want the choices in the Workflow Stage lookup to be dependent on what's chosen for Workflow.   Based on what i've read from other community posts, it sounds like I would have to write an advanced reference qualifier for the Workflow Stage field, but I can't seem to get it right.

My form looks like this:

find_real_file.png

The lookup for the Workflow table only has the Names of the workflows.   The lookup for the Workflow Stage contains all the stages for every workflow version (which is not quite the same as just workflow).   I am able to dotwalk to Workflow field through Workflow Version.   My current advanced reference qualifier looks like this: javascript:"workflow_stage.workflow_version.workflow=" + current.workflow.name; but that does absolutely nothing.  

What am I missing to get this ref qual to work?

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

You can pull this off with dependent attributes but it will be a little easier to understand if you use reference qualifiers.



Here's a sample if you want to use 3 tables, you could also do the same with a single table.



LookupTable1 (fields: u_name-string)


Primary1


Primary2



LookupTable2 (fields: u_name-string, u_dependent:ref to lookuptable1)


Secondary1a, Primary1


Secondary1b, Primary1


Secondary2a, Primary2


Secondary2b, Primary2



LookupTable3 (fields: u_name-string, u_dependent:ref to lookuptable2)


Tertiary1, Secondary1a


Tertiary2, Secondary1b


...you get the picture



Create 3 reference fields on incident, one for each lookup table. For the example we'll use "u_primary", "u_secondary", "u_tertiary".


Set the reference qualifier attribute on the second and third fields to limit the lookup base on the previous field value.


u_secondary ref qual: javascript:"u_dependent=" + current.u_primary;


u_tertiary ref qual: javascript:"u_dependent=" + current.u_tertiary;



Regards,


Sachin


hey sachin.namjoshi, I took your advice and made my reference qualifier "Advanced" and my script looks like this:



javascript:"workflow_version=" + current.workflow;



But it's still not working correctly.   Any suggestions?


SanjivMeher
Kilo Patron
Kilo Patron

Hi David,



Usually it works. Try putting it on the Dependent field on the main form instead of 'Dependent Field' tab.


Also try using reference qualifier for this. Assignment Group and Assigned to is a good example.



find_real_file.png



Please mark this response as correct or helpful if it assisted you with your question.

Actually I didn't use the Dependent Field anymore.   I made my reference qualifier Advanced and then I put in the javascript below:



find_real_file.png



This still doesn't work though.