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

How user can modify only their data on a sharepoint list

Hi

 

I have a excel file convert in  Sharepoint List for datasource.

This datasource is a directory of society with general data.

On this list i want for example user John Doe can only show and modify data of his society, How can i do ?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Giulian
Level: Powered On

Re: How user can modify only their data on a sharepoint list

Ok

I add a field into my sharepoint list with email director of society.

Now i try to make the filter between user email connecter and email of director.

I do this :

Filter(mysharepointlist;MailDirector=User().Email)

And it s OK Cat MadCat MadCat MadCat Mad

Many thanks for the tips

 

9 REPLIES 9
Super User
Super User

Re: How user can modify only their data on a sharepoint list

@Giulian 

You can do this either by Filtering your data to the user based on the criteria that would show only their society items.

So, if a user was supposed to only see items where (let's say) society was "xyz", then you would give them lists (Gallery for example) of records that were filtered with formulas like Filter(yourSharePointList, Society="xyz")

Note, this is only filtering from your App perspective. From a SharePoint standpoint, this does not keep anyone from seeing or editing other items in the SharePoint list.  If you need to handle this from the SharePoint side, then the only real option is to allow users to only be able to see and modify their own records.  Those would be records that they created only.  There is no way in SharePoint to assign item level permissions based on any other criteria.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Giulian
Level: Powered On

Re: How user can modify only their data on a sharepoint list

Ok, sorry i try to understand well

I have sharepoint site where i link app build with PowerApp, this app use sharepoint list for a datasource.

When John Doe come on this sharepoint site i want he can view only data of their society on the app and he can modify this if he want.

 

Where can i manage the right for do this on the Powerapps setting or on the sharepoint setting ?

Giulian
Level: Powered On

Re: How user can modify only their data on a sharepoint list

Ok, sorry i try to understand well

I have sharepoint site where i link app build with PowerApp, this app use sharepoint list for a datasource.

When John Doe come on this sharepoint site i want he can view only data of their society on the app and he can modify this if he want.

 

Where can i manage the right for do this on the Powerapps setting or on the sharepoint setting ?

Super User
Super User

Re: How user can modify only their data on a sharepoint list

@Giulian 

So, there is no particular setting or management of this.  It would be totally up to you in how you implement the design of your App.

Technically, at the base of it all - the SharePoint list, there is no way to specifically set the permissions of items for only certain users - permissions are for the entire list, not items.  Except in the case of configuring the List to only allow people to see their own items.  With that seeting - If the item is not created by them but it has some other criteria that you believe they should then have permission to it (a society field is your criteria), then they will NOT see it.  So, I don't believe that is an option for you.

That leaves using the Filter formulas in your App to filter the records by the appropriate criteria.  

In addition to the formula I mentioned in my first reply, you'll want to take a look at the Filter function to get an idea on how it works.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Giulian
Level: Powered On

Re: How user can modify only their data on a sharepoint list

So in my datasource i need field to put Office 365 ID of john doe and in power app filter by connected user can see only their entry ?

Super User
Super User

Re: How user can modify only their data on a sharepoint list

@Giulian 

You could do that, but doesn't your datasource have the society listed in it for which you would filter against?

It could be as simple as a formula like this:

  Filter(yourSharePointList, Society=If(User().Email=john.doe@email.com, "XYZ"))

Then if user John Doe uses the app, they will see only a list of items where society is XYZ

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Giulian
Level: Powered On

Re: How user can modify only their data on a sharepoint list

Thank i will try this

If i have many user i need to adapt formula for each one ?the formula can t be static

i can have user with many sociaty to

 

Super User
Super User

Re: How user can modify only their data on a sharepoint list

@Giulian 

Yes, that was just a very simple example.  In reality you would want to have another list that has user information in it and the Society that they should see.

Let's say you created another list (let's call it userList) and put a Text Column called UserEmail, and a Text Column called Society.  Then load it with email addresses and the Society names for those people.

 

Then, your filter would look more like this:

   Filter(yourSharePointList, Society=Lookup(userList, UserEmail=User().Email).Society)

 

This would give you the flexibility to change/add/remove/etc people and their society connection without having to modify your app.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Giulian
Level: Powered On

Re: How user can modify only their data on a sharepoint list

Ok

I add a field into my sharepoint list with email director of society.

Now i try to make the filter between user email connecter and email of director.

I do this :

Filter(mysharepointlist;MailDirector=User().Email)

And it s OK Cat MadCat MadCat MadCat Mad

Many thanks for the tips

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 75 members 4,416 guests
Recent signins:
Please welcome our newest community members: