Reverse order list of string

Hello friends,
@AshwinS2 , @arivu96, @Rammohan91, @balupad14, @Florent_Salendres, @vvaidya, @Palaniyappan, @loginerror, @MAHESH1, @Manjuts90

How to reverse the order of a list of string?
Can you please share a xaml?
Thank you,
Cami

1 Like

Hi @CamiCat
Use for each item in string

list .reverse()

Thanks
AshwinS

Thank you so much @AshwinS2.


I’m getting the erro: The expression doesn’t produce a value.
How to fix it?
CAmi

hi @CamiCat

dont give the values like list.reverse(1,0)

give it as list.reverse

that is all

Thanks
Ashwin S


Also in this way :frowning: :frowning:

Hi @CamiCat,

Please find the below link it may be useful for you…

https://forum.uipath.com/t/how-to-loop-through-list-from-the-end/7821

Cheers.
Vashisht.

1 Like

Try adding .ToArray or .ToList to the end of your assign as shown here:
image

Also, you can use the .Reverse directly inside the ForEach, so you don’t need a separate assign for it.

Regards.

Usually list.reverse won’t return any value
So we can try with INVOKE METHOD where pass the target object as you list variable and MethodName as Reverse and in the collections property pass that list variable as input

Cheers @CamiCat

5 Likes

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