Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Can a datasource be a variable?

(0) ShareShare
ReportReport
Posted on by 62

Hello,

I have a canvas app with multiple screens that reference the same datasource.  I haev a Dev Sharepoint list that I use to test new features that are to be added to the app.  Is it possible to have a variable set for the datasource so I can change the datasource in one location that will update across the app?

I have a text label that I use to put the version set to a variable so I can update it in one location.

I have tried it and using 'Set(varData, datasource) works but adding the variable does not bring up the data (ex: a dropdown that searches the SP list).

  • CPGDallas Profile Picture
    62 on at
    Can a datasource be a variable?
    I decided to completely separate the app and dev datasource. It will mean a bit more work when I finalize the app when working with the dev datasource but in the long run it's an overall improvement.  The app would need to have both datasources connected and I really don't need a dev datasource hanging out in the background of my prod app.
    Thank you for the info.
  • Pstork1 Profile Picture
    65,688 Most Valuable Professional on at
    Re: Can a datasource be a variable?

    If the datasource is SharePoint, Dataverse, or SAP then you can use an Environment Variable for the data source.  But other than environment variables there is no way to use variables to manage data sources.  You can read about environment variables here: Use environment variables in solutions - Power Apps | Microsoft Learn

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,513 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,688 Most Valuable Professional

Leaderboard