cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kylechow
Level: Powered On

Sharepoint permissons and Powerapp Data Source Permission

I would like to ask can user add some item to the sharepoint list such that other user can't see it except the user with owner right?

For example, A,B is normal user and C is the owner of the sharepoint list. What I want is that user A can only see his own created items and can't see any items created by B. And C can see all the items from all user.

 

Secondly, I want to ask can Powerapp Data Source come from different user? Because now if you create the powerapp using the account with sharepoint owner list. Different user can see all the items in the sharepoint list. What I want is that the connection to sharepoint is based who use the powerapp.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Sharepoint permissons and Powerapp Data Source Permission

Hi @kylechow,

 

There is need to make some slight changes in your function, for me it is like this:

 

SortByColumns(Filter(ApproveDemo;Author.Email = User().Email And StartsWith(Title; TextSearchBox1.Text)); "Created"; If(SortDescending1; Descending; Ascending))

 

ApproveDemo: Name of my Data Source (SharePoint list)

StartsWith: There is textinput field in mz case named "TextSearchBox1" that is used for filtering by insertind text.

Title: This is column in my SharePoint (default created when new list added) and I'm looking for text in "TextSearchBox1" in it.

And statement: Better to use this.

SortByColumns: In my case it is sorting by column "Created"

If part: There is image used to switch between ascending and descending sorting called "SortDescending1"

 

So you have to change this function, but the important part is:

 

Filter(ApproveDemo;Author.Email = User().Email)

 

P.

 

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Sharepoint permissons and Powerapp Data Source Permission

Hi @kylechow,

 

In SharePoint list there is in default hidden column that is called "Created By" this column is default one.

PA_ShP1.PNG

 

So if you are displaying items in powerapps to user, you can simply add Filter function to Items in gallery that filter it by name of user that is currently running PowerApp like this and compare it to "Author.Email" - 

Author.Email = User().Email

Whole function with search and sorting:

SortByColumns(Filter(ApproveDemo;Author.Email = User().Email Or StartsWith(ComplianceAssetId; TextSearchBox1.Text)); "ComplianceAssetId"; If(SortDescending1; Descending; Ascending))

I just slightly changed function that is created when you use "Create PowerApp" on you SharePoint list.

 

So the final result is in App:

PA_ShP3.PNGPA_ShP2.PNG

 

Hope this helps you.

P.

kylechow
Level: Powered On

Re: Sharepoint permissons and Powerapp Data Source Permission

I tried your option an I see this message in my console. And I try to lanuch the powerapp, everything is disappeared. 

Super User
Super User

Re: Sharepoint permissons and Powerapp Data Source Permission

Hi @kylechow,

 

There is need to make some slight changes in your function, for me it is like this:

 

SortByColumns(Filter(ApproveDemo;Author.Email = User().Email And StartsWith(Title; TextSearchBox1.Text)); "Created"; If(SortDescending1; Descending; Ascending))

 

ApproveDemo: Name of my Data Source (SharePoint list)

StartsWith: There is textinput field in mz case named "TextSearchBox1" that is used for filtering by insertind text.

Title: This is column in my SharePoint (default created when new list added) and I'm looking for text in "TextSearchBox1" in it.

And statement: Better to use this.

SortByColumns: In my case it is sorting by column "Created"

If part: There is image used to switch between ascending and descending sorting called "SortDescending1"

 

So you have to change this function, but the important part is:

 

Filter(ApproveDemo;Author.Email = User().Email)

 

P.

 

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,186)