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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using Get Lists to dis...
Power Apps
Unanswered

Using Get Lists to display all data in Power Apps

(0) ShareShare
ReportReport
Posted on 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!

 

 

Categories:
I have the same question (0)
  • Verified answer
    HenWang Profile Picture
    Microsoft Employee on at

    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

  • Community Power Platform Member Profile Picture
    on at

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

  • Community Power Platform Member Profile Picture
    on at

    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.

  • HenWang Profile Picture
    Microsoft Employee on at

    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 at

    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?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard