Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Reference to sharepoint list

(0) ShareShare
ReportReport
Posted on by 26

I am modifying form for sharepoint list with Power apps. I want to define sharepoint list in my expression as the list that user is using in that moment. 

 

I do not want to use a specific value (list name) because I will use the same expression for different projects. The name of my sharepoint list is "list1". 

 

Currently I have: 

Sort('list1', ID, Descending)).ID

 

How can I define a reference value for Sharepoint list in use instead of using its name ('list1' in my case)?

 

Categories:
  • RusselThomas Profile Picture
    4,012 on at
    Re: Reference to sharepoint list

    Hi @li88li ,

    I'm not aware of any way to currently variabilise DataSource objects or their properties within an app.  These assignments are absolute, unless you are using environment variables to define them across environments.

     

    When alternate sources are used across environments, then the general practice is to package your app in a solution and allow PowerApps to generate environment variables for your data sources.  These can be configured to connect to different sources across different environments.

    This is however more of an application lifecycle function, (i.e. moving apps from DEV to UAT to PROD and so forth) - so I'm not sure this is what you're looking for as you would have to move the app between environments to use this function, but feel free to take a look and explore...

    Announcing data source environment variables | Microsoft Power Apps

    Kind regards,

    RT

  • WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: Reference to sharepoint list

    Hi @li88li ,

    You cannot dynamically refer to elements such as list and field names dynamically in Power Apps, so you would need 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.

    Visit my blog Practical Power Apps

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard