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
h-nagao
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
RezaDorrani
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

 

h-nagao
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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (322)