- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2020 11:20 AM
Hi All,
Just a small query.
I have Variable which is referring to custom table.
Custom Table :
Role Display is Reference variable and above "Test Table" is used for reference. So When i select US-Store in the "Role Display" it should show relevant "US"country related location in the "Location" variable. here if US-STORE (then it is US country store. If they select (NZ-Store) then its is News Zealand country store.
So i tried script include and reference qualifier like below. But whatever i tried that is static one. I just wants to change that to dynamic one as per above logic.
Script Include :
getLocation: function(role_display) {
var gr=new GlideRecord('cmn_location');
return 'country=Australia^u_active=true';
},
Reference Qualifier :
javascript:new LocUtils().getLocation(current.variables.role_display)
Its working as expected. but if i have one store then it should be fine but i have many stores. So i just wanted to change this to dynamic one. can anyone help me on this?
Thanks in Advance!!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 02:02 AM
I have created script include and called the script include in the reference variable using advance.It worked .
Thanks all for your support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 02:02 AM
I have created script include and called the script include in the reference variable using advance.It worked .
Thanks all for your support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 03:18 AM
Great! It looks like you marked your own response as the correct answer, which may be confusing to others that read this later.
The similar approach was mentioned in my earlier reply of using Script Include and Advanced ref qualifier.
Please consider marking appropriate reply as Correct & Helpful.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader