Hi all,
I have following information in string:
2018, 2017, 2016,
I would like to receive:
2016, 2017, 2018
As you see the numbers are separated by commas.
Do you have any idea how to solve this problem?
Hi all,
I have following information in string:
2018, 2017, 2016,
I would like to receive:
2016, 2017, 2018
As you see the numbers are separated by commas.
Do you have any idea how to solve this problem?
use this:
var res=new String(varstring.ToCharArray().Reverse.ToArray())
res should be of type string and var string is the variable containing your input string.
If you have only three, then it is easy to pick the least value just by splitting and saving in a new variable.
If you have many, try to split each and then store them in a array and then use the predefined classes to get the least or normal iterations to get the least. @Krzysztof
The result is following:)
Str = β2018, 2017, 2016β
varArray [ ] = Str.Split(","c)
Then try this expression to sort array.
varSortArray [ ] = Array.sort(varArray)
Hi,
if my string is β2020,2019,2018,2017,2016β the result is also β2020,2019,2018,2017,2016β (should be β2016,2017,2018,2019,2020β).
The problem is that these years can be more than 3, eg.
2018, 2017, 2016, 2015, 2014
I have question about last assign. It should be varSortArray = Array.sort(varArray.ToString)?
It does not work.
There is problem to assign Array.sort(varArray) to vatSortArray
Could you prepare send example in uipath?
Sorry I donβt have system now. Could you please tell me what Error are you getting and show me the process in screenshots. Will check and update you.
hello @Krzysztof
Regarding this issue as you can see in the assign activity its sorting your numbers in descending order
To arrange in Ascending order just remove the descending from that code
And this below workflow will just arrange the string in reverse whatever the text be what that means is itβll place the last text to first whatever that text be
Use this workflow itβll solve your issue
reverseastring.xaml (5.3 KB)