cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Have Gallery display only the items created by current user

Hello,

 

I am currently working on an app where mulitple users will be submitting forms that write back to SP. I currently have a gallery that shows all the forms that were created and can be edited through the gallery. Currently it is showing all the forms created. How do i make it so that it just displays the forms of whoever is logged into the app?

 

The app linked thorugh O365

 

Please let me know if you have any addtional questions. 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
h-nagao
Level 10

Re: Have Gallery display only the items created by current user

Hello,
I found same question in forum. You can find solution for your case from below:

https://powerusers.microsoft.com/t5/General-Discussion/Filtering-a-gallery-by-user/m-p/133511#M46359

Thank you

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Have Gallery display only the items created by current user

Hi @Anonymous 

 

On App Load, create a variable to store the current user email or object

 

Set(varCurrentUserEmail, User().Email)

 

For gallery use filter function on Items property

 

Filter(DataSource, 'Created By'.Email = varCurrentUserEmail)

 

Plz note :- this would give you a delegation warning because Created By is a person or group type column which is a complex column (delegation will return upto 2000 records only)

 

In order to avoid delegation, create another column called "CreatedByText" and store the created by users email in there

then you could use

 

Filter(DataSource, CreatedByText = varCurrentUserEmail) which would avid the delegation warning

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Highlighted
h-nagao
Level 10

Re: Have Gallery display only the items created by current user

Hello,
I found same question in forum. You can find solution for your case from below:

https://powerusers.microsoft.com/t5/General-Discussion/Filtering-a-gallery-by-user/m-p/133511#M46359

Thank you

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 (5,084)