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

2 Likes

Hi @CamiCat
Use for each item in string

list .reverse()

Thanks
AshwinS

1 Like

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.

1 Like

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

6 Likes

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