Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Ordering a choice when new option added

(0) ShareShare
ReportReport
Posted on by 242

Hey All!

 

I'm still a bit new to Power Automate and fumbling a bit with this one. I had this flow working, but then realised I would have to manually go into and put the list into alphabetical order.

 

I'm trying to figured out OrderOption - how exactly do I use it? The microsoft page for it didn't help me much. All I want to do is just order my Choices from A to Z

JeckGill_0-1696412820407.png

(Just for clarification - the bits with the green checkmarks work with no issues - I am just having issues with the second unbound action)

Thanks in advance!

  • Verified answer
    eliotcole Profile Picture
    4,266 Super User 2025 Season 1 on at
    Re: Ordering a choice when new option added

    Yeah, so if your data is already reordered, then just place the reordered data in that (now blank) field.

     

    As is that field will accept a JSON array of the full value data for the field. This means that it will replace the current value of the field with the values you're inputting.

     

    If you are wanting to update the actual choices available, then I can't help there, I'm afraid as I'm not aware of the connector that you're using there.

  • JeckGill Profile Picture
    242 on at
    Re: Ordering a choice when new option added

    I think putting the dynamic data into "value" wasn't what I was supposed to do - the item is being added into a list that is already hundreds of items long.

    JeckGill_0-1696416976104.png

    here is the blank screenshot.

    this is the code block for the whole of that action (I have deleted the item in value)

    {
     "inputs": {
     "host": {
     "connectionName": "shared_commondataserviceforapps",
     "operationId": "PerformUnboundAction",
     "apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps"
     },
     "parameters": {
     "actionName": "OrderOption",
     "item/OptionSetName": "gg_pub_supplierproductservice",
     "item/SolutionUniqueName": "GELGroupSolution"
     },
     "authentication": {
     "type": "Raw",
     "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
     }
     }
    }

     

     

  • Verified answer
    eliotcole Profile Picture
    4,266 Super User 2025 Season 1 on at
    Re: Ordering a choice when new option added

    Hi, @JeckGill , would you be able to update the original question with a screenshot (obfuscated where needed) that shows the error that is produced?

     

    Also, can you make a code block in the original question with the value of whatever it is that you're placing in that 'Values Item - 1' field?

     

    Either way, I think I may have the answer for you, but it may require a little bit more work than I'm alluding to below.

     

    ----------

     

    I suspect that the value that you are placing in the Values field there is the same field from the previous step.

     

    So, try this in your non-working action:

    1. Tap the tiny little 'T' box to the right
    2. Delete everything in there
    3. Enter the dynamic data again

     

    Basically I am thinking that your issue is that you are potentially placing 'Array' data (a list of things, potentially with complex forms) into a field that is there to help users with more singular focus.

     

    By performing the actions that I've suggested you should be replacing the array that is there with your re-ordered array.

     

    (however, there is a chance that you may actually be replacing the whole array with less data! ... we'll see if this doesn't work or you wish to dive a bit deeper on it)

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1