Skip to main content

Notifications

Community site session details
Power Apps - Building Power Apps
Answered

Using Get Lists to display all data in Power Apps

Like (0) ShareShare
ReportReport
Posted on 23 May 2023 13:57:33 by

Hi all,

I want to show the all the lists present on a sharepoint site in a PowerApp. i am using Get Lists function in Power Automate to get all the lists collection but I am not sure how can I display the output as a gallery in Power Apps.

Can anybody help me with this.

 

Capture.PNG

Thanks!

 

 

  • Community Power Platform Member Profile Picture
    on 01 Jun 2023 at 08:43:40
    Re: Using Get Lists to display all data in Power Apps

    Thanks HenWang, but users create new lists in SP very often and i need the new lists to be connected to it dynamically too so i don't think this solution would work.

    I am thinking of using Get Lists in Power Automate. When the user clicks arrow in power apps it store ThisItem.DisplayName in Var and it is the parsed in power automate as the list name to get the items that can be displayed. Can you help me if this can work?

  • HenWang Profile Picture
    Microsoft Employee on 01 Jun 2023 at 01:53:42
    Re: Using Get Lists to display all data in Power Apps

    Hi @Anonymous ,

     

    In advance, you need to add all of these SP list into your canvas app with SP connection. Then inside the arrow button, you need to set variable and give it the value of ThisItem.Displayname .

     

    In Items property of the gallery, you will need to add switch function to check which datasource should this gallery to display:

    Switch(
    variable,
    Displayname1,SP_list1,
    Displayname2,SP_list2,
    Displayname3,SP_list3,
    ...
    )

     BR,

    Hen Wang

  • Community Power Platform Member Profile Picture
    on 31 May 2023 at 15:45:43
    Re: Using Get Lists to display all data in Power Apps

    Hi, I am now able to get a list of Ms lists in a gallery which I want to navigate through. Using the arroew buttons in the gallery I want to open the particular list into a seperate screen (Screen 2). i don't know how can i do this.
    I have tried to store the ThisItem.Displayname in a variable and then use it in the Items property of an empty gallery in screen 2 but this will need the gallery to be connected to a datasource. Can you please tell me how can I connect it because the only option is to connect in particular lists only, not with the whole sharepoint site.

     

    Your help will be much appreciated.

  • Community Power Platform Member Profile Picture
    on 30 May 2023 at 08:29:43
    Re: Using Get Lists to display all data in Power Apps

    Thank you so much for this detailed answer, it worked!!

  • Verified answer
    HenWang Profile Picture
    Microsoft Employee on 24 May 2023 at 07:08:44
    Re: Using Get Lists to display all data in Power Apps

    Hi @Anonymous ,

     

    You are trying to pass an array value from flow to canvas app, so the "Respond to a Power app or flow" cannot help with this, because this action can only pass text value instead of array value. Please try below flow:

    HenWang_0-1684911573077.png

     

    Please add the Response action at the end of your flow:

    HenWang_1-1684911619651.png

     

    Guessing we might have the same columns from the Get list output, so, please try copying below code into your "Response Body JSON Schema" Part:

    {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "Name": {
     "type": "string"
     },
     "DisplayName": {
     "type": "string"
     },
     "Type": {
     "type": "string"
     }
     },
     "required": [
     "Name",
     "DisplayName",
     "Type"
     ]
     }
    }

     

    If flow get errors about this Response action, please copy this part of the output generated by your own "Get list" action firstly:

     

    Inside the value part, there might be more than one records, but please just copy the first one of them, and then surround this record with [ and ] to make sure you are getting an array.

    HenWang_2-1684911833662.png

     

    After copying this "array", click this button in "Response" action:

    HenWang_3-1684911967679.png

     

    Paste the array and save the flow to have a try.

     

    In canvas app, I create a gallery to display the array and in the button to trigger the flow, please use below code:

    Set(flow_array,your_flow_name.Run())

     

    Then you can directly use flow_array as the items of gallery to show all the data.

     

    Best Regards,

    Hen Wang

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 32

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 19 Super User 2025 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 18 Most Valuable Professional

Overall leaderboard