- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2025 12:33 AM
I have one list collector field country which takes reference from core company table
and other list collector field Company Code which takes reference from custom table and in this custom table one field country which takes reference from same core company table.
Now I want whatever multiple value I selected in country, its dependent code should only visible in company code field.
I tried with client script and reference qualifier but it doesn't work.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
u_country_reports -> reference to core_country table?
Share dictionary config screenshot for this
variable "for_which_countries_do_you_want_the_" refers to core_country table?
share variable config screenshot for this
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
@Ankur Bawiskar
Thank you so much for your response. It works from your method by only reference qualifier and script include is not required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2025 12:43 AM - edited ‎07-18-2025 12:43 AM
Hi there,
I think this community post is similar to your query. Can you give it a try and let me know if it is working for you or not?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2025 12:50 AM
Found one more community post which talks about taking value from list collector. Please refer it here.
If my answer helps then please mark it Helpful & Accept the solution.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2025 12:52 AM
Hi @Utpal Dutta , Thank you for the response
Yes, It is quiet similar but type of field for both is list collector and in that post reference is mentioned. So in list collector multiple values can be selected so dependent also works accordingly.
But the proposed solution in that post doesn't work for me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2025 02:25 AM - edited ‎07-18-2025 02:30 AM
Hi @varshajain,
I implemented this in my PDI. Let me guide you below:
Create a script include that will glide record your custom table to fetch all records which are refereing to company table like below: (Make sure its a server script inculde not client)
var GetCompanyServer = Class.create();
GetCompanyServer.prototype = {
initialize: function() {
},
getCompanyCode: function(company){
var companyName = '';
var grComCode = new GlideRecord('u_company_with_codes'); //Replace this table name with you custom table name.
grComCode.addQuery('u_company_code', 'IN', company); //Replace 'u_comany_code' with company code field name in your custom table.
grComCode.query();
while(grComCode.next()){
gs.log('Company names are: ' + grComCode.getValue('u_company_name'));
companyName += ','+grComCode.getUniqueValue();
}
gs.log('Company names returning: ' + companyName);
return 'sys_idIN'+companyName;
},
type: 'GetCompanyServer'
};
Then you need to modify the reference qualifier of your company code variable like below:
javascript:new global.GetCompanyServer().getCompanyCode(current.variables.company);
Replace "current.variables.company" with your company variable name.
Once this is done then test your catalog item. When you will change the company variable on your catalog item, Your company code variable will only have those company code which belong to that particular company you selected.
Screenshot below:
Custom table records:
Please Accept my solution if it helps
Thanks