Attributes as variables

(Augusto Vera) #1

Is there a way to use Attributes as control variables within the same flow which created them?, sort of for examples “loop 3 times and then leave after the counter hits 4”, I have tried this in the past but attributes cannot be queried for their internal value when they were assigned a value regardless of where this value was set, you have to query the value just set in the set attributes block. In that regard there is no way to use variables within the same flow to control flows or make one path or another valid. Is there a way to go around this? maybe with Javascript Code?

(Daniel Beckett) #2

Hi @Augusto_Vera1

You can use the ‘Get Attribute’ action to pull through the latest attribute value.

Here’s an example flow showing how this works to create a loop:

Hope that helps.