reference qualifier conditions based on form view.

si21
Tera Guru

Hi experts,

We have a requirement to apply reference qualifier for a reference field based on for form view. We have 2 views for location table say A & B. The reference qualifier specified on the Dictionary entry should be applicable only for view A and not on B.

 I have already checked the exact similar question in community but didn't find the solution. Solved: Re: Reference Qualifier based on Form View - ServiceNow Community

 

How can we achieve this.

 

TIA.

1 ACCEPTED SOLUTION

Vasantharajan N
Giga Sage
Giga Sage

@si21  - Please update the encoded string and form view then try. Please make sure this change should not have any impact to other table that has reference to the locations table which is one of the foundation data. 

 

javascript: gs.action.getGlideURI().getMap().get('sysparm_form_view') == 'view A' ? 'encoded query string to apply for view A' : 'encoded query string to apply for view B'


Thanks & Regards,
Vasanth

View solution in original post

5 REPLIES 5

Hi @Vasantharajan N ,  

I have added the code in advance reference qualifier to show all employees including active=false for opened_for field but auto complete suggestion are displaying after adding this code and the other field 'subject person' has simple reference qualifier with active=false and displays autocompleter suggestions.

 

Below is the screenshot with inactive user tried searching in both fields.

Openedfor attributes also have refautocomplete  fields.

26aug.png

 

si21_0-1693018767088.png

How can I enable this autocompleter.

 

TIA.