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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Returning JSON Array b...
Power Automate
Unanswered

Returning JSON Array back to PowerApps Collection

(0) ShareShare
ReportReport
Posted on by 14

I make a call to our system via HTML and receive the results I expect, But I am struggling to get this data back to a PowerApps collection, Please help 🙂

PowerApps Button = 

ClearCollect(colGetCal,GetCalData.Run(Username)

Flow

PaulWoolf_0-1648224640635.png

This is the output from the parsing of the JSON

{
  "perform_batch_result": {
    "person_cal_except_hierarchy_select_result": {
      "@result_name""",
      "person_cal_except": [
        {
          "metrix_row_num""1",
          "available""N",
          "description""Core Training",
          "end_dttm""2022-01-01T17:00:00.0000000",
          "exception_id""470638",
          "exception_type""CORE_TRAIN",
          "person_id""TEST01",
          "start_dttm""2022-01-01T08:30:00.0000000"
        },
        {
          "metrix_row_num""2",
          "available""N",
          "description""Core Training",
          "end_dttm""2022-03-01T17:00:00.0000000",
          "exception_id""470639",
          "exception_type""CORE_TRAIN",
          "person_id""TEST01",
          "start_dttm""2022-03-01T08:30:00.0000000"
        },
        {
          "metrix_row_num""3",
          "available""N",
          "description""Core Training",
          "end_dttm""2022-04-01T17:00:00.0000000",
          "exception_id""470640",
          "exception_type""CORE_TRAIN",
          "person_id""TEST01",
          "start_dttm""2022-04-01T08:30:00.0000000"
        }
      ]
    }
  }
}

, The SCHEMA

{
    "type""object",
    "properties": {
        "perform_batch_result": {
            "type""object",
            "properties": {
                "person_cal_except_hierarchy_select_result": {
                    "type""object",
                    "properties": {
                        "@@result_name": {
                            "type""string"
                        },
                        "person_cal_except": {
                            "type""array",
                            "items": {
                                "type""object",
                                "properties": {
                                    "metrix_row_num": {
                                        "type""string"
                                    },
                                    "available": {
                                        "type""string"
                                    },
                                    "description": {
                                        "type""string"
                                    },
                                    "end_dttm": {
                                        "type""string"
                                    },
                                    "exception_id": {
                                        "type""string"
                                    },
                                    "exception_type": {
                                        "type""string"
                                    },
                                    "person_id": {
                                        "type""string"
                                    },
                                    "start_dttm": {
                                        "type""string"
                                    }
                                },
                                "required": [
                                    "metrix_row_num",
                                    "available",
                                    "description",
                                    "end_dttm",
                                    "exception_id",
                                    "exception_type",
                                    "person_id",
                                    "start_dttm"
                                ]
                            }
                        }
                    }
                }
            }
        }
    }
}

In the response I get the body from the JSON Parse and use the following schema

{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "metrix_row_num": {
                "type""string"
            },
            "available": {
                "type""string"
            },
            "description": {
                "type""string"
            },
            "end_dttm": {
                "type""string"
            },
            "exception_id": {
                "type""string"
            },
            "exception_type": {
                "type""string"
            },
            "person_id": {
                "type""string"
            },
            "start_dttm": {
                "type""string"
            }
        },
        "required": [
            "metrix_row_num",
            "available",
            "description",
            "end_dttm",
            "exception_id",
            "exception_type",
            "person_id",
            "start_dttm"
        ]
    }
}
When i execute this from within PowerApps all i get is the headings, no data. i am obviously missing something
PaulWoolf_1-1648225080107.png

 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    Try returning the array person_cal_except dynamic content as the response:

    Snag_84d1a3e.png

    This will return following:

    [
     {
     "metrix_row_num": "1",
     "available": "N",
     "description": "Core Training",
     "end_dttm": "2022-01-01T17:00:00.0000000",
     "exception_id": "470638",
     "exception_type": "CORE_TRAIN",
     "person_id": "TEST01",
     "start_dttm": "2022-01-01T08:30:00.0000000"
     },
     {
     "metrix_row_num": "2",
     "available": "N",
     "description": "Core Training",
     "end_dttm": "2022-03-01T17:00:00.0000000",
     "exception_id": "470639",
     "exception_type": "CORE_TRAIN",
     "person_id": "TEST01",
     "start_dttm": "2022-03-01T08:30:00.0000000"
     },
     {
     "metrix_row_num": "3",
     "available": "N",
     "description": "Core Training",
     "end_dttm": "2022-04-01T17:00:00.0000000",
     "exception_id": "470640",
     "exception_type": "CORE_TRAIN",
     "person_id": "TEST01",
     "start_dttm": "2022-04-01T08:30:00.0000000"
     }
    ]

     


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

  • PaulWoolf Profile Picture
    14 on at

    Thank you Ellis, I did try that before but it was returning Null, But I have tried again and it worked, So thank you

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard