How to populate list collector based on reference field value

neharao
Giga Contributor

Hi All,

I have a requirement where I have a "country" field reference to "core_country" and when a country is selected here I have to populate the list collector having "catalog item" to be categorised based on "country" field selected. i.e I need to fetch the cat items based on "Country" .If the country is not found in the list collector then the list collector should not appear or may be some message to be displayed .

Thanks,

Neha

9 REPLIES 9

Hi Anirudh,

 

Thank you for the reply. I tried the mentioned script. But unfortunately the list collector is not getting set as per user country.

Could please advise me further.

 

Thanks,

NEha

Hi Anirudh,

 

Thanks for the reply. I tried the mentioned script. But only one value gets populated from "list collector" and gets populated in the "selected" coloumn. But I do not want this to get populated in "selected" list. I want this to just get categorised based on country in the "available" list of list collector.

Could you please advise me further how to proceed.

 

Thanks,

NEha

If you don't want to actually select the items, all you should need is an Advanced Reference qualifier:

javascript:'u_country='+current.user_country;

 


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Hi Paul,

 

Thanks for the reply. But I have already tried this and if I add this condition in the reference qualifier nothing pops up. The normal catalog items are also not shown.

 

Thanks,

NEha

neharao
Giga Contributor

Hi Anirudh,

 

I have tried to put the alert to check. But in the alert it is capturing all the values. It's just that it is not getting set on the list collector. Is there anything else that I need to add. Could you please suggest.

 

Thanks,

Neha