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 / How to collect to a dy...
Power Apps
Unanswered

How to collect to a dynamic connection

(0) ShareShare
ReportReport
Posted on by 504

Hello guys I want to make the connection of the patch a variable; is it possible? 

Set(varAOAConnection, "AOA");

Patch(varAOAConnection,
LookUp(varAOAConnection,QuestionIndex=Value(QuestionIndexLabel.Text) && Language="EN"),
 {
 QuestionValue: TextInput2_8.Text
 }
)

 

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

    Hi @nagestiada ,

    Short answer no - you cannot refer to data sources dynamically. You would have to hard-code it all.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @nagestiada ,

     

    In PowerApps, the data source you update must be a constant, not a variable. Or you can try this:

    Update different data sources based on the value of variable.

    Switch(var, 
    "AOA",Patch(datasource1,
    LookUp(datasource1,QuestionIndex=Value(QuestionIndexLabel.Text) && Language="EN"),
     {
     QuestionValue: TextInput2_8.Text
     }
    ),
    “BOB”,Patch(datasource2,
    LookUp(datasource2,QuestionIndex=Value(QuestionIndexLabel.Text) && Language="EN"),
     {
     QuestionValue: TextInput2_8.Text
     }
    ),…)
    

     

    Best regards,

    Rimmon Li 

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