cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Srautio
Advocate I
Advocate I

Returning Array via Response - Blank Array?

Hey,

 

I've been trying to figure out why this flow of mine doesn't seem to return any actual values in PowerApps.

The Input to the Response action looks like this:

[
  {
    "Title": "string",
    "PublishingPageImage": "string",
    "PublishingPageContent": "string",
    "ID": "integer"
  },
  {
    "Title": "string",
    "PublishingPageImage": "string",
    "PublishingPageContent": "html text",
    "ID": "integer"
  },
  {
    "Title": "string",
    "PublishingPageImage": "string",
    "PublishingPageContent": "string",
    "ID": "integer"
  }
]

Response Body JSON Schema

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "Title": {
        "type": "string"
      },
      "PublishingPageImage": {
        "type": "string"
      },
      "PublishingPageContent": {
        "type": "string"
      },
      "ID": {
        "type": "string"
      }
    }
  }
}

 And the actual Output of the Response 

[
  {
    "Title": "string",
    "PublishingPageImage": "string",
    "PublishingPageContent": "string",
    "ID": "integer"
  },
  {
    "Title": "string",
    "PublishingPageImage": "string",
    "PublishingPageContent": "html text",
    "ID": "integer"
  },
  {
    "Title": "string",
    "PublishingPageImage": "string",
    "PublishingPageContent": "string",
    "ID": "integer"
  }
]

The Input and Output has been manually edited to hide the content.

 

Now when I try to collect the flow in PowerApps I can see the "headers" of the response (aswell as metadata headers) but they're all blank.

 

Inside PowerAppsInside PowerApps

empty response.PNG

 

Any pointers here?

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @Srautio,

Could you please share a screenshot about your flow's configuration?

Where do you retrieve the Input data? Do you add a Respond to PowerApps action within your flow?

The user @doubles has faced similar issue with you, please check my response within the following thread:
https://powerusers.microsoft.com/t5/General-Discussion/Issue-executing-a-SQL-SP-with-a-response-to-P...

I have made a test on my side, and don't have the issue that you mentioned. Please take a try with the following workaround:

Flow's configuration:2.JPG

 

3.JPG

Within the "Initialize variable" action, Name set to ArrayData, Type set to Array, Value field set to following:

[
  {
    "Title": "string",
    "PublishingPageImage": "string",
    "PublishingPageContent": "string",
    "ID": "integer"
  },
  {
    "Title": "string",
    "PublishingPageImage": "string",
    "PublishingPageContent": "html text",
    "ID": "integer"
  },
  {
    "Title": "string",
    "PublishingPageImage": "string",
    "PublishingPageContent": "string",
    "ID": "integer"
  }
]

Within the "Response" action, Body field set to ArrayData variable dynamic content. Response Body JSON schema field set to following:

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "Title": {
                "type": "string"
            },
            "PublishingPageImage": {
                "type": "string"
            },
            "PublishingPageContent": {
                "type": "string"
            },
            "ID": {
                "type": "string"
            }
        },
        "required": [
            "Title",
            "PublishingPageImage",
            "PublishingPageContent",
            "ID"
        ]
    }
}

App's configuration:4.JPG

the result Collection saved successfully as below:5.JPG

Please also check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/

If the issue still exists, please take a try to re-create your flow and app, then try it agian, check if the issue is solved.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

firstPart.PNGsecondPart.PNG

Here's the flow in its entirety

 

I get a comma separated string of IDs from PowerApps, split it, initialize an empty Array, for each split ID I send an HTTP Request to get some fields from SharePoint, Append each response body to the array, and finally I try to respond to PowerApps with the full aray of body items. 

 

 

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,486)