cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper 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
Highlighted
Community Support
Community Support

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.
Highlighted
Helper I
Helper I

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,671)