The CreatorCon Call for Content is officially open! Get started here.

Remove a choice from a variable which is populated through Reference qualifier.

1_DipikaD
Kilo Sage

Hi All ,

I want to remove Brazil from country variable which is a look up select box(refers to a custom table) with variable attribute and reference qualifier with it as shown in the below picture . How to remove Brazil and to add other choices to the country variable . 

 

When I select region= America in country field displays 3 choices that are fetched from referenced table based on the reference qualifier.

 

 

Country Variable :-

 

variable attribute -- >    ref_qual_elements=region

Refers to table ---> 

 

Please let me know if you need more info .

Thank you

 

1 ACCEPTED SOLUTION

@1_DipikaD 

try giving sysId of that record which is Brazil with America

Ensure you give correct semi-colon, Community adds : instead of ;

javascript:'u_region=' + current.variables.region.toString() + '^sys_id!=giveSysIdHere';

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Yes, that is the requirement but I have tried the above ref. qualifier but it removed all the choices .

 

 

@1_DipikaD 

try giving sysId of that record which is Brazil with America

Ensure you give correct semi-colon, Community adds : instead of ;

javascript:'u_region=' + current.variables.region.toString() + '^sys_id!=giveSysIdHere';

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

Thank You

It's worked for me . If want want add more choices into it then I have to mention sys id of all the records in ref. qualifier individually or is there any better way to deal with it if you can suggest while adding various choices.

Thank You

@1_DipikaD 

you can add multiple sysIds which you want to exclude like this

javascript: 'u_region=' + current.variables.region.toString() + '^sys_idNOT INsysId1,sysId2,sysId3';

OR

You can call system property and that property holds comma separated sysIds

javascript: 'u_region=' + current.variables.region.toString() + '^sys_idNOT IN' + gs.getProperty('propertyName');

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Not exclude want to include a few more choices to the Variable.