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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Extract data from mult...
Power Apps
Unanswered

Extract data from multi level object into different collections in powerapps

(0) ShareShare
ReportReport
Posted on by 6

I have a response from the flow that has created a multi level collection. I am looking for help in trying to access data nested 3 levels deep in the collection. 
Refer to the below screenshot, I'm trying to access sc in one collection(with all the nested layers again as sub collection  i.e sections and actions) and PN in another collection. tried multiple ways using Forall function but could not achieve this. 
Kindly help me to achieve this. Thanks!

Swathi_Nalla_0-1663603938861.png

 

 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Swathi_Nalla 

    What is the root of your data?  Is it JSON, data, or response?

    Do you have any example of the JSON itself and also any particular formulas where you feel you were "close".

  • Swathi_Nalla Profile Picture
    6 on at


    Hi @RandyHayes 
    its the response from the flow.
    My root is data
    Need to sc which is inside data.response.Predict 
    I tried the below one. but failed

    ClearCollect(
    scColl,
    ForAll(
    collectionName.data,
    {
    Sc: Value
    }
    )
    )

    I'm only to access Value here but not data.response.predict.sc. not sure how to get there.
    and in Value there is not data

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Swathi_Nalla 

    Let's get the collections and ForAll's out of the way for now...you most likely don't need them for anything anyway.

     

    What is illusive in your formula comparing to your original JSON tree is that you have no Value column.  

     

    First tell me more about collectionName.  Where is that being populated?  Is that from a Flow or API call being put into some collection?

     

    From the look of your data, you would not have a table returned in data...you have a data, response and Predict record.

     

    {data:

        {response:

           {Predict: 

               {sc: {id: 2, Name: "test1", sections: [{sectionid....etc..., Actions: [{...}]] ] },

                resolutions: {},

                ref: {}.

                PN: {}

            }

        }

    }

     

    However, if you are trying to stuff this into a collection...then the whole thing automatically becomes a table (because a collection is an in memory database table!)

     

    So how are you pulling this in?

            

  • Swathi_Nalla Profile Picture
    6 on at

    @RandyHayes 
    Hi Randy,

    So the process is
    In powerapps on StartScreen I'm calling the flow where in it calls the API and use parse json and
    returns me this response to powerapps.
    (Since the response is not unique always I'm returing as it is from the flow without spilting)

    I'm holding this response in variable in powerapps. Set(Res,CompleteRes.Run()); 

    So here in this response, I need to access the SC which is inside Predict and bind that data to the nested gallery in powerapps as SC data holds nested arrays.
    Also in another gallery I need to bind the data from PN

    So I'm in process of extracting the data and keeping them in collections so that
    it will be easy for binding data to different gallery also it will be easy to do the POST call back to API using flow- which I'm not able to achieve.

    Thanks!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard