cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Filtering gallery by current user

So I am nearly finished creating my Helpdesk system but having issues filtering the galleries. I am using a O365 Connector and using DisplayName, there is no column in my Sharepoint list with Email address and I would rather not add one. 

So I am filtering the gallery in Powerapps with filter('sharepointlist', 'galleryfield'=office365users.myprofile().displayname)

 

I am getting an error along the lines of the property expects record values and incompatible with table values and also got delegation issues.

 

I am trying to filter 2 galleries in my powerapps.

 

Any help would be greatly appreciated. 

 

thanks 

 

Amy.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper I
Helper I

Re: Filtering gallery by current user

I solved this myself.

I was putting my formula in the Defaults rather than Items.

Also had to change my formula and Sharepoint list a bit to get it to work.

View solution in original post

5 REPLIES 5
Highlighted
Helper I
Helper I

Re: Filtering gallery by current user

I solved this myself.

I was putting my formula in the Defaults rather than Items.

Also had to change my formula and Sharepoint list a bit to get it to work.

View solution in original post

Highlighted
New Member

Re: Filtering gallery by current user

Any chance of providing a sample of what worked? I'm facing the same issue.

Highlighted
Frequent Visitor

Re: Filtering gallery by current user

Hello, I have similar requirement. I need to be able to filter the gallery  base on the current user, the gallery is connected to the database that has the list of all the employees from two different branch office.  Each branch office has an HR.  So, if HR 1 is log in i want the gallery to show only the employees from Branch 1, same with HR 2 with only the list of employees showing from Branch 2. I've added an Office ID for each employee on the database. I also have a search box on top of the gallery.  Right now, this the formula that i have, it works but it doesn't filter the gallery base on HR log in.

If(IsBlank(Search.Text),EmpCollection,SortByColumns(Search(EmpCollection,Search.Text,"LastName")"FirstName"))

 

Any tip would be great, Thank you!

Highlighted
Advocate II
Advocate II

Re: Filtering gallery by current user

No offence but this should not be accepted as a solution. Please let us know what you did as this is a very common problem where the usual fix is "Don't use the People or Group" sharepoint column type 😞

Highlighted
Frequent Visitor

Re: Filtering gallery by current user

Hi, we set a Switch and Filter function on the On Visible.

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,223)