until loop - if condition misses the final iteration

arkiboys 9,706 Reputation points
2023-10-21T08:15:45.5466667+00:00

hello,
can you see why the if statement which is inside the until loop, misses the final iteration?
for example, if there are 5 iterations, then the last iteration, i.e. number 5 gets missed and if does not get called for it.

User's image

User's image

User's image

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

Answer accepted by question author
  1. ShaikMaheer-MSFT 38,556 Reputation points Microsoft Employee Moderator
    2023-10-22T06:21:07.9+00:00

    Hi arkiboys,

    Thank you for posting query in Microsoft Q&A Platform.

    During your last iteration, before if activity, you're until flag value is setting to true. And as per If activity expression, your condition will evaluate to false during last iteration. Hence execution of If activity will not go insider True block. To avoid it, use if activity before until flag set variable activity.

    Hope this helps. Please let me know if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well. Thank you.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.