Using the data within the "Changed Fields" Pill

Alec Hanson
Tera Guru

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.

find_real_file.png

Thanks

1 ACCEPTED SOLUTION

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.find_real_file.png

 

Hope that helps!

View solution in original post

11 REPLIES 11

Community Alums
Not applicable

Hi 

this still not working fine with me. I did the same steps. My goal is to trigger a notification if a priority is raised in an incident record. But always when testing i got no record in the For each loop

 

 

ghzelmed08_0-1693927048740.png

 

Very useful, Brian! Thanks for sharing!!

How would I do this is I wanted to update a record that the previous value holds? The changed field that triggers my flow is a list type field that references my custom table (same table that the list type field is on - so would be equivalent to related incidents on the incident form). When I remove one of the related records from the list, I want to update that record so its own related records list field does not have the trigger record of the flow still shown. I am trying to do a for each loop that uses if flow logic to compare previous value to current value (by saying if previous value is not current value) then I want to update the record (previous value). Does that make sense?

I think I have the gist of what you are saying, but I would suggest creating a new question for your specific scenario. A new question will get more views and subsequently you'll have a better chance  at getting a good answer.

Shruti Kamboj
Tera Contributor

Hi, 

I want to know on which release of ServiceNow you are working for these change fields.

I am working on Paris and it is show read only for me.

Here is the open thread : 

https://community.servicenow.com/community?id=community_question&sys_id=b78ce902db01ec107d3e02d5ca9619d7