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.

 

1_DipikaD_0-1760508577887.png

Country Variable :-

1_DipikaD_1-1760508692470.png

variable attribute -- >    ref_qual_elements=region

Refers to table ---> 

1_DipikaD_2-1760508733019.png

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

Nawal Singh
Giga Guru

Hi @1_DipikaD ,

 

Replace your current reference qualifier  with-

 

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

Please test and review

 

If you found my response helpful, please mark it as helpful and accept it as the solution.

Thank you
Nawal Singh

Ankur Bawiskar
Tera Patron
Tera Patron

@1_DipikaD 

simply exclude that 1 record by giving like this

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

💡 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 & @Nawal Singh ,

 

Tried this - javascript:'u_region='+current.variables.region.toString()+ 'u_country!= Brazil';

But it removed all choices with Brazil .

 

Thank you 

@1_DipikaD 

Brazil comes under America

So as per your requirement when America is selected in Region then you don't want to see Brazil Country?

If yes then above ref qualifier will work fine.

if not then what's your actual requirement?

💡 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