Working with Previous/Current values in Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2022 08:44 AM
I'm building a simple flow where I'm creating an incident record if the email address of a user record (sys_user) changes. I have a question on how to use previous and current values from the Trigger record to build the description in my Create Incident Record action.
I want my description to say something like this:
"The email address for Abel Tuter has changed from <previous email value> to <current email value>. Please review subscriptions as needed."
This post states that the previous values should be accessible. The "FDChangeDetails" data pill is grayed out when I try to access it from my "Create Incident Action". Is there another way I should be accessing the data?
Thanks.
- Labels:
-
flow designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2022 08:55 AM
Hi,
Commonly, I've seen someone loop through that object. So the object (Changed Fields) -- which is accessible. Here's a post on how to do that: see correct answer here: https://community.servicenow.com/community?id=community_question&sys_id=0aa94af9db6594101cd8a345ca96...
And then there's an alternative way (which isn't ideal, but I wanted to throw it out there): https://community.servicenow.com/community?id=community_article&sys_id=bf896bf3db58c5502454e6be13961...
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2022 08:29 AM
Hi,
Thanks for marking my reply as Helpful.
If it also helps guide you Correctly, please also mark it as Correct.
Thanks and take care! 🙂
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2022 06:51 AM
Rick,
When I had to do this previously, I used a flow variable and scripting in a 'Set Flow Variables' action.
I defined the flow variable as JSON, as the array content is an object.
The set flow variables action had this in it (you would likely want to switch for email_address):-
You can obviously create and set multiple flow variables according to your needs in this action.
Each flow variable then holds a JSON object of known format:-
{
"previous_display_value":"",
"previous_value":"",
"current_display_value":"",
"current_value":"",
"field_name":""
}
Which you can then simply access as an object (In this example a log statement):-
It means you can quickly extract what you need a single action and then those elsewhere in your flow without having to use FD for each loops.
Hope this helps,
Richard