Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need to order the digits of a value in ascending.
Ex:
5234756
Answer:
2345567
can anyone help me??
If you want to do this in the script you can use this technique: Alphabetically sort characters in a string
If you want a chart expression you can try something like this: =concat( mid('5234756', ValueLoop(1, len('5234756')),1),'',mid('5234756', ValueLoop(1, len('5234756')),1))
Where are you trying this? Script or Front end. Would you provide few more values?
If you want to do this in the script you can use this technique: Alphabetically sort characters in a string
If you want a chart expression you can try something like this: =concat( mid('5234756', ValueLoop(1, len('5234756')),1),'',mid('5234756', ValueLoop(1, len('5234756')),1))
Hi anil,
I am trying this is front end. In chart expression.
May be check gysbert solution
=concat( mid(FieldName, ValueLoop(1, len(FieldName)),1),'',mid(FieldName, ValueLoop(1, len(FieldName)),1))
Hi Gysbert and anil,
Thank you. now its working fine,
Hi Anil,
Could you explain the expression please??
=concat( mid(FieldName, ValueLoop(1, len(FieldName)),1),'',mid(FieldName, ValueLoop(1, len(FieldName)),1))
Hi Anil,
Could you explain the expression please???
I don't know how to work that valueloop() in this expression..
Very tough to explanation. Let me try
Valueloop() can create from starting number to ending number within loop. When you are confused with one expression i would suggest you to split into many possible expresions
Len(5234756) -- How many digits are there? 7
ValueLoop(1, Len(5234756)) -- It consider as ValueLoop(1,7) -- It returns as 1234567
Mid(5234756,ValueLoop(1,Len(5234756))) -- It will return as how may values are there we need to return like 2347563475647565234756566756
Finally, It occurs to consist as sorting from Desc to asc due to we are using Mid two times till where our values are ending up