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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch to different dat...
Power Apps
Answered

Patch to different datasource depending on a variable

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I would like the information collected by my app to be written to a specific datasource depending on which user is logged in.

Currently, I am using:

'If(User().Email = "...",Patch(...' etc.

but with over 20 distinct users this is not ideal.

 

I have tried unsucessfully to Set a dynamically named  variable by Concatenating and then:

Patch(variablename,

or

Patch(Text(variablename),

etc.

Any help with Patching to dynamic datasources would be appreciated.

Thanks,

David

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @Anonymous ,

     You cannot refer dynamically to a data source, control or field in Power Apps, so you will have to hard-code it.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    That's a pity. Thanks for the reply.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard