How to use the last element of a list of integers in uipath?

Good night friends,

I have a problem, I want to create a list of integers and then list only the penultimate element, I don’t understand why I get that error, can someone help me?
List_test.zip (11.3 KB)

Hi @gh_lzm

Try this

CutPage.AsEnumerable.Reverse.Take(2).Last.ToString

It didn’t work for me, I’m working with a list

@gh_lzm

Try This

CutPage.AsEnumerable.Reverse.Take(2).Last.ToString
1 Like

Yours works too ok, Thank you very much for your help

it worked for me with this
CutPage(CutPage.Count-2).ToString

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