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

Using a variable in Patch to reference a data source

I'm working on an app with the eventual intent of distributing it to attendees during intercompany events. Because one of the functions of this app is to post collected information to a SharePoint list, I want to add functionality to let users supply the name of the SharePoint list to export the data to - after all, our engagement partners are unlikely to have access to our internal SharePoint lists. However, the app uses the Patch function to append the data to SharePoint, and I can't find a way to transform the inputted list name (a String) into the actual Table object corresponding to that list. Is there some sort of workaround I can employ here? I would rather not tell everyone we distribute the app to that they have to open it up in an editor and replace the hard-coded list name.

1 ACCEPTED SOLUTION

Accepted Solutions
BCLS776
Super User
Super User

Unfortunately, Power Apps doesn't currently support dynamically assigning a data source name at run time.

 

For your use case, would it work to create a separate Sharepoint site and lists that are accessible by external users too? That would let you set up the connection properly in advance and then share it out to everyone who needs it.

 

Hope that helps,

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
BCLS776
Super User
Super User

Unfortunately, Power Apps doesn't currently support dynamically assigning a data source name at run time.

 

For your use case, would it work to create a separate Sharepoint site and lists that are accessible by external users too? That would let you set up the connection properly in advance and then share it out to everyone who needs it.

 

Hope that helps,

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

That's not a bad idea for a workaround. Unfortunately, that wouldn't work in our case since the records I'm trying to populate to SharePoint are business cards that have been shared between companies, and a central pool listing everyone's wouldn't make much sense (and would rapidly become cluttered).

Another option to consider is to give end users a Microsoft Forms link that asks for name/email/card photo etc and upon submission uses a Power Automate flow to put the info into your Sharepoint list. The users don't need access to the list in that case -- they can use Microsoft Forms on any web browser.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,335)