cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lukasz2
Frequent Visitor

Create new Sharepoint list element based on form and allow to view only own items on this list

I don't know if this is a question more related to sharepoint permissions, anyway
I've already done flow like this:

lukasz2_0-1616689857316.png

 


it will  create new element on sharepoint list based on  Microsft Form with attachement:

lukasz2_1-1616689857319.png

 

 

flow is run by a dedicated user called DMS
Unfortunately in this case the item in sharepoint is created also by this user (DMS) .
so I added an extra column  "Osoba" which contains the form responder "Łukasz Świerżewski" in example above

lukasz2_2-1616689857320.png

 

The case is that i want everyone has access to this list, but I would like people to see only the items they added. 

By default, the owner of this item is DMS(flow user), so I think I need to grant permissions based on this created column, but I don't know how to do it.

 

Changing the sharepoint list option below will not help because the owner of this item is still DMS

lukasz2_3-1616689857321.png

 

I also tried adding permissions after creating the item but the user still doesn't have permissions if the option above is enabled

lukasz2_4-1616689857321.png

 

Can anyone help me with this

2 REPLIES 2
sudharsan1985
Super User
Super User

Hi @lukasz2 

If you want only the logged-in user's items to be visible, then start creating a new View. Make the view the default view and then specify the filter condition like mentioned below. Instead of choosing the Created By field choose the Osoba field and the rest came as the screenshot below. So whenever the users navigate to the list, they will see only their items. There is one caveat, the actual DMS user cannot see any items since the Osoba field won't have the DMS user. Make sure you navigate to the All Items view when you want to see all the items.

sudharsan1985_0-1616722064078.png

 

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

@sudharsan1985 


Ok but then when it comes to permissions, users will have permission to other items - it will only be restricted by the view. it is also about not having the rights to the others. as you know, I tried to implement a solution from another thread - sending a request which should change the author but it does not work

Thread:

https://powerusers.microsoft.com/t5/Building-Flows/Modifying-Created-By-on-SharePoint-List-with-Powe...

 

Original solution:

http://johnliu.net/blog/2019/2/flowninja-hack-78-modifying-modified-by-and-modified-time-with-micros...

 

Output:

 

lukasz2_0-1616744288552.png

 



I checked the element link  before and after request  - ....._api/web/lists/getbytitle('MyFancyListName')/items(44)

I can't find the "Author" and "editor" values ​​there but I see there is "AuthorId" and "EditorId" and it looks like my request is changing these values. because when I'm not doing the request, it's 11 and if request is performed it is changed into 10 and i know that it is correct user ID because I also have form responder in one column and it's actually 10.

lukasz2_1-1616744289859.png

 

The level item permissions were enabled before that , sorry this is in Polish language but is turned on properly:

image.png

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (36,609)