Iterate the loop once

Hi, I need your urgenlty help.
I am reading a email on FIFO basis. It’s working fine. But like I have 10 or 5 unread email in the Inbox.
My bot will read the Oldest email. But I want to run only once then I don’t want to itirate it second time.

But when I put the Break Activity it showing me use in a ForEach but here I am using the While loop to fetch the email on FIFO basis. Please help me.
@Palaniyappan @indra @Lahiru.Fernando @Raghavendraprasad

Fine
Along with current co diction you have in while loop include this condition as well
your present condition AND counter < 1
Where counter is a variable of type int32 with default value as 0 defined in the variable panel
—inside the while loop atlast use a assign activity like this
counter = counter + 1
So this will make the loop to iterate only once

Cheers @balkishan

1 Like

My condition is this bro.

EmailCount is the total number of emails, Here I am reading the latest once only. It’s working fine. But I want to iterate only one time not the second time,

1 Like

Yah add this condition along with the current one and try
@balkishan

1 Like

Okay let me check bro

Yah inside the while loop atlast use a assign activity and mention like this
counter = counter + 1

Cheers @balkishan

1 Like

Let me check bro, and get back to you.

1 Like

Sure
@balkishan

Hi Palani, It’s really worked bro. Thank you very very much :slight_smile:

Cheers @balkishan

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.