Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
jeevays7
Partner - Creator III
Partner - Creator III

order the digit of a value in ascending

Hi all,

I need to order the digits of a value in ascending.

Ex:

5234756

Answer:

2345567

can anyone help me??

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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))


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Anil_Babu_Samineni

Where are you trying this? Script or Front end. Would you provide few more values?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Gysbert_Wassenaar

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))


talk is cheap, supply exceeds demand
jeevays7
Partner - Creator III
Partner - Creator III
Author

Hi anil,

I am trying this is front end. In chart expression.

Anil_Babu_Samineni

May be check gysbert solution

=concat( mid(FieldName, ValueLoop(1, len(FieldName)),1),'',mid(FieldName, ValueLoop(1, len(FieldName)),1))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jeevays7
Partner - Creator III
Partner - Creator III
Author

Hi Gysbert and anil,

Thank you. now its working fine,

jeevays7
Partner - Creator III
Partner - Creator III
Author

Hi Anil,

Could you explain the expression please??

=concat( mid(FieldName, ValueLoop(1, len(FieldName)),1),'',mid(FieldName, ValueLoop(1, len(FieldName)),1))

jeevays7
Partner - Creator III
Partner - Creator III
Author

Hi Anil,

Could you explain the expression please???

I don't know how to work that valueloop() in this expression..

Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful