Is there a way to assign multiple years to a variable and have that change with each new year? Right now, we have a variable called Years that holds the following data:
{“2020”, “2019”, “2018”, “2017”, “2016”}
Is there a way to have UiPath automatically populate each year from 2016 to current? Thanks in advance!
So I decided to go with ppr’s and Dave’s responses with the following:
Years = Enumerable.Range(2017, today.year+1-2017).Reverse().Select(Function (x) x.toString).ToList
I had to add the +1 because today.year was pulling 2019 for some reason. All of our computers are set to the current date. I found the +1 in another forum post.
Side note: Using this method required the Type Into activity. Neither the Set Text nor the Select Item activities worked.