web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Re-arrange the data by...
Power Automate
Unanswered

Re-arrange the data by Alphabetical

(0) ShareShare
ReportReport
Posted on by 164

Hi Everyone,

 

I have Original data string as below, is it possible to re-arrange(ascending) and accord to the specific item?

The specific @item()[11] is my target ascending item, the final data after ascending will become as After ascending.

 

Original data:

[
"ABC",
"KS",
"DND",
"",
"CE",
43117,
43152,
"CL",
"T124",
"CLi",
"CV",
364139,
364139,
"6D",
"",
"",
"",
"",
"",
"",
"",
"",
"CK",
"",
"",
43312,
"CJ"
],
[
"RK",
"GCE",
"DOD",
"",
"CE",
43267,
43203,
"POL",
"W123",
"CKOn",
"CMV",
345139,
364139,
"I453K",
"",
"",
"",
"",
"",
"",
"",
"",
"1CPKS",
"",
"",
43770,
"DIEKNSI"
],
[
"RNK",
"KKMA",
"OUPDA",
"",
"AE",
43667,
43603,
"CPO",
"ISOM",
"LOIN",
"CVOPNS",
404139,
364139,
"6M",
"",
"",
"",
"",
"",
"",
"",
"",
"21",
"",
"",
43670,
"LOJN"
]
 
After ascending:

[

"RK",

"GCE",

"DOD",

"",

"CE",

43267,

43203,

"POL",

"W123",

"CKOn",

"CMV",

345139,

364139,

"I453K",

"",

"",

"",

"",

"",

"",

"",

"",

"1CPKS",

"",

"",

43770,

"DIEKNSI"

],

[

"ABC",

"KS",

"DND",

"",

"CE",

43117,

43152,

"CL",

"T124",

"CLi",

"CV",

364139,

364139,

"6D",

"",

"",

"",

"",

"",

"",

"",

"",

"CK",

"",

"",

43312,

"CJ"

],

[

"RNK",

"KKMA",

"OUPDA",

"",

"AE",

43667,

43603,

"CPO",

"ISOM",

"LOIN",

"CVOPNS",

404139,

364139,

"6M",

"",

"",

"",

"",

"",

"",

"",

"",

"21",

"",

"",

43670,

"LOJN"

]

 
Regards,
ilu989
Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @ilu989 ,

     

    You may need to sort the numbers first, and then sort the array elements. Currently, Flow has no direct action to achieve this requirement.

     

    Best Regards,

  • ilu989 Profile Picture
    164 on at

    Hi @v-bacao-msft ,

     

    Thanks for your tips, I found Liu's Blog might help on this:

    http://johnliu.net/blog/2018/12/how-to-implement-sort-with-microsoft-flow-in-3-actions-within-a-loop

    But, my situation is the numbers are not unique, sometimes have the repeat number display in different elements, so Liu method can't suite in my case, do you have a more specify method can teach me? Thank you very much.

     

    Regards,

    ilu989

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @ilu989 ,

     

    If number is not unique, I'm afraid it's impossible to sort. Because we need it as a key column to sort and extract the elements contained in the array.

     

    Best Regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 664

#2
Haque Profile Picture

Haque 460

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard