Reference Qualifier based on the other field value

msm4
Mega Guru

Hi Team,

How to limit the values for a reference field based on the other field value.

Is that possible?

Can anyone suggest some solution please.

BR,

Smitha

15 REPLIES 15

please find the below screenshot, here in the screenshoot , requested for is belong to HUPI Org. company , the below variable Approver Name which refer to a user table, should limit the values to HUPI Org users.



There is an other condition .. Amoung the HUPI org users. only VIP users should be displayed.



I hope im clear with my question.


find_real_file.png


find_real_file.png


Geoffrey2
ServiceNow Employee
ServiceNow Employee

Then the Reference qualifier on the Approver name field would be:


javascript: 'company=' + current.company + '^vip=true';



You might need to add the ref_qual_elements=company attribute to the Approver field too.   This sends the value of the Company field to the server when updating the Reference qualifier.


msm4
Mega Guru

How to add one more filter as query   by concatenating the below script


javascript: 'company=' + current.company;



My one more filter is "u_default_assignment_group" is "xyz_group".


Julian Hoch
ServiceNow Employee
ServiceNow Employee

The reference qualifier string is basically an encoded query, so you can add another condition with "^" (see: http://wiki.servicenow.com/index.php?title=Encoded_Query_Strings#gsc.tab=0 ).


adityaghosh
Tera Guru

if the variable is present in sc form... it can be accessed by   current.variables...



e.g.   javascript:'requested_for='+current.variables.u_requested_for



in your case it'll be javascript:"managed_by="+current.variables.assigned_to




find_real_file.png