cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Srautio
Level: Powered On

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.

 

powerapps flow.PNGInside PowerApps

empty response.PNG

 

Any pointers here?

2 REPLIES 2
Community Support Team
Community Support Team

Re: Returning Array via Response - Blank Array?

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.
Srautio
Level: Powered On

Re: Returning Array via Response - Blank Array?

 

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,687)