How do I get the display value of a MRVS variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2021 12:43 PM
Hello, I have a Flow Designer flow that has an MRVS. I get the MRVS data through the Get Catalog variables. I am trying to send an email in the flow and the body of the email needs to contain some of the data from the MRVS. I am executing a For Each action and used the data pill to include the MRVS data in the body of the email. However, it is only retrieving the sys_id. How do I get the display values for the variables in the MRVS?
This is what is showing in the email body:
Donna Davis is requesting access to a72ebcd71b1434901c274377cc4bcb64.
Thanks
- Labels:
-
flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2021 11:58 AM
As a workaround, I placed the display value of the variable in a separate field in the MRVS and passed that along. Not the best since the column shows in the Service Portal, but it does work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 08:32 PM
Hi, do you have the code snippet that you can share? I am in the same situation as yours but mine is displaying a value in the MRVS to the description field in a task.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2021 03:39 PM
One thing you can do is GlideRecord into the 'question_choice' table, like below:
var val;
var dv = new GlideRecord('question_choice');
dv.addQuery('question', questionValue); // change questionValue with the question's sys_id
dv.addQuery('value', mrvsVariable); // change to be the mrvs variable value you are looking for
dv.query();
while(dv.next()){
val = dv.text; // this is the display value
}
The 'question_choice' table holds the choice questions from the select boxes' choice tab.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2021 09:47 PM
Hi there,
.getCellDisplayValue should work to get display values for the variables in the MRVS. See:
Creating records or a summary from Multi-Row Variable Set (2)
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field