Using the "Read Text from file", I'm storing the contents into a List variable. I simply need to know how many lines the text file contains. Without looping through each index and manually incrementing a LineNum variable, is there a function that would tell me the maximum index value?
Many Thanks!
But if you are looking for that to be your loop max, then you want %List.Count - 1% if your %LoopIndex% is being used to reference the row you are looking for in your list. Because the list is a 0 based index, the first item is 0, the second is 1, so on and so forth until the last item is %List.Count - 1%.
Then, when you need to call that row in the loop, you say:
%List[LoopIndex]%
Good luck!
Thank you very much! I was looking too hard for a solution, and yours is perfect!
If you have a list stored as %List%, you can get the number of items in it as %List.Count%.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional