How can I count the number of times a repeat actions a certain condition?

Hey all,

I have a basic repeat with a single condition managing a duplicate record.

So, condition path 1 just outputs a ‘duplicate’ value
condition path 2 inputs the record into the db.

What I’m trying to do is count how many records are a duplicate and how many are inserted into the DB.

I don’t want to run a new multi-record-query outside of the the repeat as this could get quite slow over time, so wondered if there is a way to count the number of times a repeat runs for each condition?

Use a variable that increments its value each time there is a repeat. The final value of the variable will be the number that you require.

e.g.
set variable = 0
repeat
set variable = variable + 1

2 Likes

Thank you ben! This is a good idea, I’ll try this.