cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Get Data from Sharepoint lists to powerapp based on listname parameter.

I  have 3 or 4 look up lists which I want to load at the start of Powerapp.

I get the "Limit the data collection" warning. when I do ClearCollect(coll, listname);

I can avoid this by using flow to get the list data.

This is the flow I  have.

Getitems(sitename, listname)

Select operation( I have to Map the columns I need from the list).

and then send the response back to PowerApps by mapping the JSON from the Select step.

 

Is there  a way I can make the select operation generic by passing the list name. so that it return all the columns from the lookup list. 

or do I have to have a flow for every lookup list  as the JSON generated is different for each list.

 

 

Thanks

 

2 REPLIES 2
Community Support
Community Support

Hi @prabhavs,

 

Yes, you could input custom value into the List Name field of the Get items action, then put the parameter extract from Power Apps.

Then mapping the select action, we should use the expression, for example, "item()?['Title']" is trying to get Title value of current item:

Annotation 2020-07-21 104445.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks but this was not what I am looking for

 

 I will clarify my question:

Is there  a way I can make the Select operation generic by passing the list name. so that it return all the columns of  the list? 

or do I have to have a separate flow for  each list  as the JSON generated is different for each list?

 

I know I can use list names in the get items but it looks like I need to map the columns individually,  I need  on the select step. 

For example I have a list A with Title, Email column,

then in the Select  step  I need to map the Title, Email so I can get the data.

Tomorrow if I add another column Phone to list A,

as of now, I need to go to the flow and map the Phone so I can get the data. 

 

I am looking for a solution, when I pass a parameter list A to a flow, return all the columns of list A.

and if I change the parameter value to list B to the same flow return all the columns of list B.

 

Can I get all the items all columns  in the list instead of mapping  each column in the Select step?

 

Thanks

 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (51,060)