It also depends on how you are managing the counters. For the expression you listed above, the counters MUST start at the max count and DECREMENT by 1 on each iteration. Additionally, if you have nested loops the inner loop MUST reset back to the max count on each iteration of the outer loop.
For what it’s worth…,
I do not think you need nested loops in this use case. As I understand it, you are adding the SAME row types and only need to assign the correct Pet and correct Service based on the selection lists - plus maybe assign some other related details.
You only need nested loops if you are adding or updating DIFFERENT row types.
By handling this in a single loop, it will be more efficient and a LOT fewer actions and a LOT less confusing.
The way I would handle this is to include one additional column named maybe [Add Row Count]. This column is assigned the value [Pet Count] * [Service Count] - total number of rows to be added - and its only purpose is to control the looping.
On each iteration, I would use [Pet Count] and [Service Count] as the index into the selection lists to assign the correct Pet and service.
Additionally, on each iteration, an action would control the updating of the “count” columns, paying special attention to resetting when appropriate. For example, let’s say you have 2 Pets and 3 Services and you want to process by Pet - i.e. for the same Pet assign the 3 services first then assign the 3 services for the next Pet.
On each iteration, you keep the Pet Count the same but would decrement the Service Count. When Service Count reaches zero, then decrement Pet Count AND reset the Service Count. Obviously, Add Row Count is always decremented.
I hope this helps! If not this time, at least in the future.