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

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
amydixanne
Level: Powered On

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
amydixanne
Level: Powered On

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

macqueens
Level: Power Up

Re: Filtering gallery by current user

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

Yla
Level: Powered On

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!

PeterDonohue
Level: Powered On

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 😞

Yla
Level: Powered On

Re: Filtering gallery by current user

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,935)