How to use Choice field values ​​in a flow

bonsai
Mega Sage

I want to extract the value of a record's choice field in a flow.
In a data pill I get the label value.
Is there a better way to do this?

1 ACCEPTED SOLUTION

@bonsai 

not possible. It's a platform behavior and it will always give choice label and not choice value

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@bonsai 

if you access a field value using Data pill it should give you that choice value and not label.

where are you using this? share screenshots etc

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I created a test flow.

It just outputs the value of the choice field to the log.

The display value was recorded in the log.

I am using OOTB fields and choices.

It has numbers as values, not labels

 

naibuti_1.JPGnaibuti_2.JPGnaibuti_3.JPG

The instance is the Xanadu version.

@bonsai 

that's how the OOB data pill works for flow with choice field.

It prints the choice label but if you use that in IF logic to compare then it uses value to compare

that's the platform behavior

choice label in flow.gif

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader