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.

How to add in reference qualifier for catalog variables value active=true

Jorge17
Tera Contributor

Hello,

I want to hide groups that are set active=false and show only active group. Can someone help me how to add active=true into the current JavaScript.

 

Here is the current Javascript:

 javascript: var refQual = getAssgnGrps(current.variables.assignment_group_search_finder); refQual += '^nameNOT LIKEBL-'; refQual;

 

Here is screenshot of the form I need to add it to:

Jorge17_0-1686326217315.png

 

Thank you for your time and assistance.

Jorge

1 ACCEPTED SOLUTION

Namrata Ghorpad
Mega Sage

Hi @Jorge17 ,

 

Please change reference qualifier like below.

 

javascript: var refQual = getAssgnGrps(current.variables.assignment_group_search_finder); refQual += '^nameNOT LIKEBL-^active=true'; refQual;

 

Please mark my answer as helpful/correct if it helps you.

Regards,

Namrata

View solution in original post

3 REPLIES 3

Namrata Ghorpad
Mega Sage

Hi @Jorge17 ,

 

Please change reference qualifier like below.

 

javascript: var refQual = getAssgnGrps(current.variables.assignment_group_search_finder); refQual += '^nameNOT LIKEBL-^active=true'; refQual;

 

Please mark my answer as helpful/correct if it helps you.

Regards,

Namrata

Hi Namrata,

Thank you for your help as it worked.

 

Thank you for your assisstance!

Jorge

Hi Namrata

after I made this change to the assignment group I am only seeing active group. I found this problem when I assign to a person name and search for the group he belongs to it shows all the groups instead the ones is a member of. Do you what changes I need to make to fix this?

 

I have another instance that I didn’t deploy this update to and it working as expected. can you help me ?