Re:Looping using multiple dates Definitely yes, it is possible to do so. What you can do is use excel to perform calculation on today’s date i.e. to get today’s date-10, today’s date-9 and so. Using Tools->Variable Manager, create one list variable say ‘ReverseCount’ and select ‘Read from text file’ option. Create one text file say, rc.txt in c:\ drive and specify its path in ‘Select File’ textbox. This file would contain the series of numbers in reverse order for e.g. ReverseCount=10,9,8,7………
Also, create one more variable say, ‘Ydate’ of value type, to store yesterday’s date. Using excel function ‘=today()-1’ get yesterday’s date and assign it to ‘Ydate’ variable.
Now, loop around this list variable, ‘ReverseCount’ and within this loop calculate, today()-ReverseCount, using excel. The resultant date can be entered in a field of an application. Then using ‘If’ command, compare the resultant date and the yesterday’s date if they are equal then exit from loop, using ‘Exit Loop’ command.
We have also attached the task file (Loop for date.atmn) for your convenience. Copy it under location: My Documents\Automation Anywhere\Automation Anywhere\My Tasks\.
Before running the task, make the changes according to your requirement and using Tools->Variable Manager create list variable, ReverseCount and value type of variable, Ydate as suggested above. |