Update the value in a variable within a loop

I have a loop and want to set the value of a variable from within that loop. I’m showing a list of records but want to be able to show a button if the previous item in the loop contains a particular value. So I’m thinking that a variable is the best way. I can set it to 1 if the value is what I’m looking for, then the next item will show the button if the value is 1 and then reset it back to 0.

The showing if value is 1 is straightforward but I can’t see how I can change the variable value within the loop.

Community Page
Last updated: