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

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
2 REPLIES 2
RezaDorrani
Level 10

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

Hi @bubs 

 

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

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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: 124 members 4,584 guests
Please welcome our newest community members: