I am unsure if I am getting the condition right - you mean: for each year if some condition is met, then “January +year”, else make a “for each month” loop to get “February + year”, “March + year” etc.? Do you want to simply exclude January from the array placed under “i”?
@vivek_Chowdary,
I would then add double if in your “for each year” section of the automation, where “result” here is just a variable created to check a condition. Is the output something you are looking for? If the condition is met here, the output is “January 2018, January 2019”. Of course, I have also added “March” to the array scope of “i”.
How about now? You just need to place “For Each month” like you had it the first time within “then” instead of that “Write line” activity. The output is shown for the case when “result” was entered as “example”. while.xaml (10.7 KB)
I also have used a similar kind of approach. But what’s happening is if the condition is met it’s executing. But if its not met then the robot is not going into the for loop and the execution is being stopped.