List values in Flow Designer are showing as sys_ids instead of Values

Russ Heard3
Mega Expert

Hi,

First time creating a Flow in Flow Designer, want to send an email to interested parties about Failed Changes.

One of the Change columns I want to show on the email is the 'Region Affected' which is a Choice List of one to six regions.

The Regions are being returned as a list of sys_ids, rather than a list of text values.
Does this mean Choice Lists cannot be shown, or am I doing some thing wrong (as I suspect)?

Choice List 

find_real_file.png

Change record

find_real_file.png

Email Body generated 

find_real_file.png

 

Thanks!
Russ                       

1 ACCEPTED SOLUTION

In this case a simple way to go would be to first do a look up of all region records that is on the trigger record, then loop through all records, and store their display names in a Flow variable.
Once done, use the data in the Flow variable as input in your email action.

I've made a simple example for you to examine and alter it so that it fits your needs.

find_real_file.png

View solution in original post

15 REPLIES 15

Allen Andreas
Administrator
Administrator

Hi,

A list field's value consist of sys_ids.

You'd want to consider getting/using the displayValue of that field instead.

You can attempt to dot-walk to the reference table and then to the name field.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

WE are talking about a LIST not a REFERENCE

OlaN
Giga Sage
Giga Sage

Hi, since a list basically only stores a comma-separated string of sys_ids, that is all you can get out of it.

If you need to get the display values you will need to create a script step/script action that converts all sys_ids to display values, and return them to be consumed later in your flow

Russ Heard3
Mega Expert

Allen & OlaN, 
thanks for your replies, but I'm none the wiser (did say it was my first time with Flow Designer 🙂 ).

There could be up to 6 values in the list so that makes it even more complicated for me - I guess some sort of loop would be needed. 

I'm not sure how I'd use any script to get the display values. I want to put them in the mail body.

Do I need to set an initial action to get the values, then use them in separate Send Email action? 
Or use the script button on the mail body itself? 

None of the questions I've seen on here show how to set the script and then use the variable returned from the script.