cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kosenurm
Super User
Super User

Return JSON array to PowerApp from Power Automate flow

Hi there,

 

I have a Power Automate flow which returns a JSON array from a DevOps connector. The end of the flow uses the Response action 200 to push the output into the app. 

 

In my canvas app, I am collecting the JSON array data and triggering the flow as below:

 

 

 

ClearCollect(listTeams, 'ListTeamswithinProject'.Run(Dropdown.Selected.id))

 

 

 

I want then parse this JSON within 'listTeams' collection to just retrieve three elements into a new collection table - "name", "id" and "url". How can I achieve this last step?

 

The schema for the JSON is

 

 

{
    "type": "object",
    "properties": {
        "value": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "identityUrl": {
                        "type": "string"
                    },
                    "projectName": {
                        "type": "string"
                    },
                    "projectId": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "url",
                    "description",
                    "identityUrl",
                    "projectName",
                    "projectId"
                ]
            }
        },
        "count": {
            "type": "integer"
        }
    }
}

 

 

Ultimately, the "name" column of this collection table will be used in a dropdown/combobox later in the canvas app.

 

In my dropdown, I have tried setting the Items to 'listTeams', but I can only access count or value. I have tried listTeams.value.name but this errors out?

 

Thanks

K.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

If you are only using the data for the dropdown the best way to do that would be to use a Data Select in the flow to select only those three columns before returning the data.  That would give you the data you need and improve performance by shrinking the size of the array you are returning.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Pstork1
Dual Super User
Dual Super User

If you are only using the data for the dropdown the best way to do that would be to use a Data Select in the flow to select only those three columns before returning the data.  That would give you the data you need and improve performance by shrinking the size of the array you are returning.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,449)