- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 06:23 AM
Hi all
I'm developing an scope app and I have come across a scenario where I must access a field value( Question) defined on the Catalog item say "Customer" from a client script of Multirow variable set and filter only the visitors belongs to that Customer.
Customer field on Catalog variables section
Based on the customers the visitor (reference field) of the Multirow variable set needs to be filtered and displayed.
Kindly share your advice how should I get the value of Customer field on to the client script of Variable set.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 07:00 AM
you cannot access outside variables in ref qualifier of variable present in MRVS
but there is a workaround mentioned here; try that and enhance as per your case
SOLVED: Issue with MRVS multi row variable set accessing the form values
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 06:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 07:00 AM
you cannot access outside variables in ref qualifier of variable present in MRVS
but there is a workaround mentioned here; try that and enhance as per your case
SOLVED: Issue with MRVS multi row variable set accessing the form values
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 07:25 AM
issue is when useing g_form you access the g_form from the MRVS itself.
You can bypass this by placing a catalog client script on the item. with onload.
var g_form_item = g_form
now within the MRVS itself use the g_form_item as if you are on the form itself. Do something like:
var customer = g_form_item.getValue('customer');
<do rest of actions>
And yes, note this is not officially not possible, and yet it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2022 02:16 AM