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 / DataSourceInfo.CreateP...
Power Apps
Unanswered

DataSourceInfo.CreatePermission for specific locations?

(0) ShareShare
ReportReport
Posted on by 315

Hi!

We have an app with several different locations.

When you open the app, you select the location. Every new record for each location will be given the correct owner through a flow.

 

I want the NEW item and EDIT buttons to be visible for those with the proper permissions.

The EDIT button is simple:

RecordInfo(First(Filter(Tables, Table = gal_Table.Selected.VO_Table)), RecordInfo.EditPermission)

 

I am struggling a bit more with the NEW button:

DataSourceInfo.CreatePermission

 

This will make it visible to anyone with CreatePermission and does not use any location specific data.

Is there a best practice on how to make this more specific to the location?

 

Does it need to be something like this?

DataSourceInfo.CreatePermission // Check if person can write to this table
&&
(
RecordInfo(First(Filter(Tables, location_lookup.LocationID = varLocation.LocationID)), RecordInfo.EditPermission) // Check if user also has edit permission to a corresponding record for the location
||
IsBlank(Filter(Tables, location_lookup.LocationID = varLocation.LocationID)) // By pass the EditPermission check if there are no records for this location yet
)

Or is there a better / simpler way to deal with it?

 

Categories:
I have the same question (0)
  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @mrstian89,
    Not sure I understand fully the requirements for the create button. The Create button should not depend on any selected location and typically visible all the time if the users have create location privileges, so why not just have an expression like this:

    RecordInfo(MyTableName, RecordInfo.CreatePermission)

    Note: replace MyTableName with the name (singular) of the table, you should have intellisense to fill this. Also, you edit button expression can be simplify with the LookUp function like this:

    RecordInfo(LookUp(Tables, Table = gal_Table.Selected.VO_Table), RecordInfo.EditPermission)

    Hope this helps!

  • mrstian89 Profile Picture
    315 on at

    When you open the app, you can select your desired location. You might have write access to one location, but read access to others.

    They are using the same tables in Dataverse, and is "separated" by assigning Owner based on location (to a team).

     

    If the "Add item" button has 

    RecordInfo(MyTableName, RecordInfo.CreatePermission)

    it will be visible no matter what location you are in, even if you actually dont have write access for this specific location. 

     

    Is there any good way to make sure that it is only visible when you actually have write access?
    Is it possible to also add a check if you are part of the owner team for the location? 
    The ID of the owner team has it's own column in the Location table 

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Thanks for clarifying, I understand that user have access to only the location they/team own. But I',m still not sure what you mean for the creation.... The location isn't created yet so write access is irrevelant. The users would be able to create locations, and they or the team that is set on create will only have access to it. Is it that you're pre-populating the Owner of the new location getting created to the selected location's Owner? If so, then the visibilitye expression of the Create button can be exactly the same of the Edit button. Sorry I might be missing something...



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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 206

Last 30 days Overall leaderboard