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

Community site session details

Session Id : 5mQfJHj/PHlr47DGdOczxE
Power Apps - Building Power Apps
Answered

ClearCollect not returning fields from JSON schema Flow

Like (0) ShareShare
ReportReport
Posted on 5 Apr 2021 15:31:10 by

I have a Flow that is returning data from a Json schema  search.Variable input.

ClearCollect(RestApi_Results,RESTAPI_INPUT_PARAMETERS_PA.Run(TextInput1.Text))

 

I have a Gallery on the screen to view the results.

The return from the Flow is not bring back anf fields to display.

But I have been checking the Flow and it is still running successfully. ?

response json.jpg

 

Thanks

Dave

I have the same question (0)
  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on 05 Apr 2021 at 16:23:32
    Re: ClearCollect not returning fields from JSON schema Flow

    Double check the Response action after a run to make sure you have a valid JSON schema for the results being returned.  This is the most common problem.  Another issue is if one of the required fields in the JSON schema has a record with a null value.  You can use a filter array to remove those records from the results.  I would also suggest using a Data Select to only send back the columns you need rather than everything returned.

  • Community Power Platform Member Profile Picture
    on 05 Apr 2021 at 16:42:45
    Re: ClearCollect not returning fields from JSON schema Flow

    I have never attempted this ?

    "You can use a filter array to remove those records from the results"

    or

    I would also suggest using a Data Select to only send back the columns you need rather than everything returned.

     

    Examples please.

    dave

  • Verified answer
    Pstork1 Profile Picture
    68,271 Most Valuable Professional on 05 Apr 2021 at 16:47:08
    Re: ClearCollect not returning fields from JSON schema Flow

    This is from a flow that does a Get Items from a SharePoint list. the Parse JSON is there because the Select statement outputs an array, but if you need access to the individual fields you need to do a Parse JSON.

    image.png

  • Community Power Platform Member Profile Picture
    on 05 Apr 2021 at 19:55:43
    Re: ClearCollect not returning fields from JSON schema Flow

    so lets just say, I want to bring back one fields for  test right now..

    "SiteName"

    does this look correct ?

     

     

    {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
    "ElapsedTime": {
    "type": "integer"
    },
    "PrimaryQueryResult": {
    "type": "object",
    "properties": {
    "CustomResults": {
    "type": "array",
    "items":
    { "type: "object",
    "properties": {
    "SiteName": {
    "type": "string"
    }
    }
    },
    "QueryId": {
    "type": "string"
    },

     

    The open/closed brackets  syntax

  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on 05 Apr 2021 at 20:59:17
    Re: ClearCollect not returning fields from JSON schema Flow

    Yes, I think that's right.  But the easy way to check is to put the output in a ParseJSON and see what it generates as a schema.

  • Community Power Platform Member Profile Picture
    on 06 Apr 2021 at 19:22:37
    Re: ClearCollect not returning fields from JSON schema Flow

    This is the perfect example and works:

    https://michalguzowski.pl/search-in-sharepoint-from-powerapps/

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard