
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 10:14 AM
Hi
I am trying to write Flow to trigger on change of a field and then take action based on previous and current value of that field.
Thought this would be easy but I am unable to get to the previous value. I have stripped back into a simple log flow and I can see the data in Trigger -> Changed Fields but I am unable to access the data within this individually.
As it is an array I have also tried to access the data in an array, but this is not working. Screenshot is below. I'm obviously not doing some in the flow I should be doing.
Thanks
Solved! Go to Solution.
- Labels:
-
flow designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2020 12:54 PM
Hi Alec - It looks like you are trying to log the changed fields from the Trigger Record. What You need to do in your "For Each Item" loop, is reference the data pill for the specific FDChangeDetails record. See the example attached.
Another item of Note in my example, the value of the field I am looking is a reference to the sys_id on the sys_user table user record, so I have to then go lookup the record with that sys_id to get the actual record I want to work with.
Hope that helps!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 01:55 PM
It is not possible to use a "previous" value unless you have stored that value elsewhere/previously in the flow. Flows run asynchronous to the database action, therefore, like Business Rules, previous is null when async.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 03:01 AM
Hi,
I get that the flow runs asynchronously, but on a "Record created or updated" Trigger it presents you with a Changed Fields pill which implies that it automatically captures the value so that it can be used elsewhere in the flow.
As per the above screenshot the Trigger<-Changed Fields data item HAS the data in an array - it is there, visible and accurate.
However if you navigate through the Pill data it breaks this down into the constituent fields of the array i.e. Trigger<-Changed Fields<-FDChangeDetails<-Previous Value and this is then empty.
The array itself still has the data but it is not accessible in the breakdown offered.
Alec

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2020 12:54 PM
Hi Alec - It looks like you are trying to log the changed fields from the Trigger Record. What You need to do in your "For Each Item" loop, is reference the data pill for the specific FDChangeDetails record. See the example attached.
Another item of Note in my example, the value of the field I am looking is a reference to the sys_id on the sys_user table user record, so I have to then go lookup the record with that sys_id to get the actual record I want to work with.
Hope that helps!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2020 03:09 AM
Thanks Brian that is wonderful and I can see that I was trying to access the data before looping the array. Fantastic!