Flow Designer - Does it matter from which Trigger/Action I select a Data Pill?

andrea_s
Tera Expert

What I tested so far is the following flow, triggered by a record:

  • Trigger - A record is created
  • Action 1 - The record is updated (assigned to Beth)
  • Action 2 - Ask Beth's manager for approval

For referencing Beth's manager in Action 2 I can either use the Data Pill under Trigger or the Data Pill under Action 1. They are practically the same (i.e. the flow tests fine with either of the two).

 

Yet, I would have expected only the Data Pill from Action 1 to work, because the Data Pill generated under the Trigger does not know whom the record is assigned to, and therefore does not know whose manager to ask. Assigned to and the relative Manager are only known after Action 1 is completed.

 

So to my questions, in case I have the same Data Pill over multiple steps:

  • Do Data Pills capture a particular state of the Trigger/Action in which they are generated?
  • Or is it just a repetition of the same Data Pill under different Actions, so that it does not matter from which step I select it?

 

2023-11-22 10_02_26-Flow Designer - Flow Designer _ NeedIt Fulfillment and 1 more page - Work - Micr.png

 

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron

Hi @andrea_s 

 

in most of the cases it doesn't matter, but I recommend always to use the "nearest" data pill to be sure accessing the latest data version. Especially if your data is passed to a subflow and changed there, you can come into situations with weird results.

 

Also check out the following videos: If I'm not wrong, in one of these videos Chuck Tomasi is dealing with your topic: https://www.youtube.com/@ServiceNowCommunity/search?query=flow%20designer%20lessons%20learned

 

Maik

View solution in original post

Here in this Video, I have covered the Custom Application Pattern Troubleshooting and configuration Thank you for visiting my channel. Here, I'll share various technical knowledge. Feel free to reach out to me directly for any Service Now-related queries. Your support encourages me to consistently
3 REPLIES 3

Maik Skoddow
Tera Patron

Hi @andrea_s 

 

in most of the cases it doesn't matter, but I recommend always to use the "nearest" data pill to be sure accessing the latest data version. Especially if your data is passed to a subflow and changed there, you can come into situations with weird results.

 

Also check out the following videos: If I'm not wrong, in one of these videos Chuck Tomasi is dealing with your topic: https://www.youtube.com/@ServiceNowCommunity/search?query=flow%20designer%20lessons%20learned

 

Maik

Here in this Video, I have covered the Custom Application Pattern Troubleshooting and configuration Thank you for visiting my channel. Here, I'll share various technical knowledge. Feel free to reach out to me directly for any Service Now-related queries. Your support encourages me to consistently

Kushal09
Tera Guru

Hello there, I would always suggest to use the latest iteration of the record hence pill from "1. Update Record" is the one I would use.
Answering your questions:
1. Data pills are just visual representations of variables that can be used. When you select the record type variable, it is basically picking up the sys_id of that record.
2. Let's say in step 3 you wanted to use a particular field you updated in step 1. Now which data pill would you use? You would use the data pill for the record from step 1. Hence as I mentioned before always use the latest iteration of the record.

Please mark as helpful if I answered your query
Kushal Bahirwani
Technical Consultant

Shruti
Giga Sage

Hi,

You should always use updated/latest record data pill instead of Triggered record if you are updating the triggered record in the flow