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.
Thanks!
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?
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
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.
Thank you so much for this detailed answer, it worked!!
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:
Please add the Response action at the end of your flow:
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.
After copying this "array", click this button in "Response" action:
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
MS.Ragavendar
32
Michael E. Gernaey
19
Super User 2025 Season 1
WarrenBelz
18
Most Valuable Professional