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
Impactful Individual
Impactful Individual

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 II
Dual Super User II

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

 

Impactful Individual
Impactful Individual

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,523)