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.

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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