We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Flow Designer FDChangeDetails wrong Previous value is picked

Chandru SP
Tera Expert

Hi Everyone,

 

I am sending an Email notification in flow designer with the "state" field's previous and current value.

ChandruSP_0-1755772191076.png

The state filed has multiple choices with same value, so when the FDchangeDetails > Previous Display Value is used it picks the wrong choice to send.

ChandruSP_1-1755772338887.png

ChandruSP_2-1755772393828.png

this should have been Scope to validate, instead it picked "pending" as it has the same value as "scope"
Tried: changing the sequence of the choice list [ still the same ]


Thanks.

 

 

1 ACCEPTED SOLUTION

Chandru SP
Tera Expert

@SowmyaSuru I haven't found the root cause but did a workaround.

Issue : When directly using the Display value for the state it shows the wrong one as it picks a value in random.

Workaround: Create a custom flow action.
Inputs: value of the choices.
script action: based on the back-end value assign a custom display value.
Output: custom display value for the email

Edit: This is to only handle the display value for the email in flow designer as in my case which the choice changes it sets the proper value in the record flow. [Note: if your choice has multiple similar values its better to set the display value instead of setting the back-end value in the script]

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron

@Chandru SP 

flow is on which table?

what's the trigger condition?

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

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

Raghav Sharma24
Giga Patron

What is the table/trigger condition.

Based on that you can store the previous state at some pint in flow in flow variable and send it in notification.

 

 

SowmyaSuru
ServiceNow Employee

@Chandru SP , Did you find the rootcause for this?

Chandru SP
Tera Expert

@SowmyaSuru I haven't found the root cause but did a workaround.

Issue : When directly using the Display value for the state it shows the wrong one as it picks a value in random.

Workaround: Create a custom flow action.
Inputs: value of the choices.
script action: based on the back-end value assign a custom display value.
Output: custom display value for the email

Edit: This is to only handle the display value for the email in flow designer as in my case which the choice changes it sets the proper value in the record flow. [Note: if your choice has multiple similar values its better to set the display value instead of setting the back-end value in the script]