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

Community site session details

Session Id : wUFmALgX2uFcxWyiFUqjfX
Power Automate - Building Flows
Answered

Ordering a choice when new option added

Like (0) ShareShare
ReportReport
Posted on 4 Oct 2023 09:50:34 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!

I have the same question (0)
  • Verified answer
    eliotcole Profile Picture
    4,273 Moderator on 04 Oct 2023 at 12:01:52
    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 04 Oct 2023 at 11:02:13
    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,273 Moderator on 04 Oct 2023 at 10:48:42
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 854 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 525 Moderator

#3
trice602 Profile Picture

trice602 318 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete