Save a variable to start on the next day

Hi to everyone!
I have a automation that send promotions to clients of my organization in WhatsApp Web.
My automation works from 8am to 17pm and i have to save the last contact that my loop For Each traversed.
I’m using one CSV file to save the contacts of my clients and i have to start the next contact in the next one in the next day.
How can i do that?
I will put one attachment of a printscreen of the CSV file for example.



One thing you can do is save the value to an asset …and on the following day…you can first start the bot with reading the asset…if asset is NA then either its start or everything is complete…if asset has a value then

rownumber = Dt.Rows.IndexOf(dt.AsEnumerable.Where(function(x) x("ID").ToString.Equals(str_assetvalue))(0))

This will give you the row number where the data is present …now use

Dt.Skip(rownumber+1).CopyToDataTable as the input for the for loop …so when its NA value will be -1 so it comes to 0 …else if some row index is found it will skip all the rows till that row and then starts from the next

Hope this helps


Hi @Matheus_Antunes

Another approach

dtResult.AsEnumerable().Skip(index + 1).CopyToDataTable

Then just loop though the dtResult


you can save the last contact in a text file or something using write text file
so the text file looks like this

before your for-each loop add this

  1. read text file to lastdayContact variable
    2 set skip = True
  2. if lastDayContact is empty set skip = False (meaning start from beginning of the file)

in for each add this logic

for reference
Sequence.xaml (18.6 KB)

Hey guys!
Thanks for helping me again! I’m very happy with this community, but I’m having some problems running this way :/.
I’m a little newbie to UiPath, but I’m trying really hard.
Can you send me those ideas with another way to execute this?
I believe that my difficulty is in understanding the order in which things need to be in order to work.