Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Variable filter based on another Variable

lisac
Giga Contributor

I have a variable that is a reference field on assignment group called 'ref_bua_group'.   When a user selects the assignment group, I want the user variable called 'ref_bua_user' to only display users based upon on that assignment group select.   Does anyone know how i can accomplish this?

3 REPLIES 3

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Lisa,



You can achieve this via reference qualifier condition.


http://wiki.servicenow.com/index.php?title=Reference_Qualifiers


Erik Stolberg
Tera Guru

If you're using a record producer, you will use what Pradeep referenced within the Variables Attributes field and the Reference qual field.



The Variables Attributes field on your 'ref_bua_user' variable would be:


ref_qual_elements=ref_bua_group



The Reference qual field would be whatever your encoded filter would be, something like:


javascript: 'XXX='+current.variables.ref_bua_group;



where XXX is the field on the user table that references the group field.


Thank you! This solved my issue with ref quals in my record producer!