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

Gallery filter based on emails is not working

Dear All,

 

Thank you in advance for your help and time.

 

I am trying to filter a sharepoint list based on the column "Staff" which stores the emails of the user.

Bellow my sharepoint List:

 

Capture.PNG

 

 

 

I tried many formulas but nothing seems to work

 

This is what i want to do:

Filter('ICT Equipment', Staff = User().Email)

but it is not working.

 

i am not sure i write the correct column information...

 

Thanks again!!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Gallery filter based on emails is not working

Hi @DarkLord22 ,

 

Could you please share more details about your persontype , do they allow multiple selections,if yes you can use

ShowColumns( 'Persontype column name', "Email"),

If not just:

Filter('ICT Equipment',User().Email in Staff.Email)

 

Could you please check whehter your person type column allow multiple selections?

20190221filtercurrentuser.PNG

 

 

Hope this can be helpful.

Best Regards.

Yumia

12 REPLIES 12
Community Support Team
Community Support Team

Re: Gallery filter based on emails is not working

Hi @DarkLord22 ,

 

Do you want to filter the current email in the staff column of your sp list?

What type of your staff column? Is it Choice type or Single Line type or others?

No matter which type I think firstly you should make sure the column name is same in the formula and in your sp list.

Could you  please check the letter of staff if similar?

 

If it is single line

I think you can change your formula expression to : Filter('ICT Equipment', User().Email in Staff)

Or if it is choice type , you can change your formula expression to : Filter('ICT Equipment',User().Email = Staff.Value)

20190221filtergallerybycurrentuser.jpg

 

Hope this can be helpful.

Best Regards.

Yumia

DarkLord22
Level: Powered On

Re: Gallery filter based on emails is not working

Yes i want to filter the current staff email so the gallery will only show the same email information 

staff column is "Person or Group Type" you thing that might affect?

 

both your formulas are not working... Smiley Sad  

 

I am not sure what i do wrong...

 

Thank you!

DarkLord22
Level: Powered On

Re: Gallery filter based on emails is not working

Ok i changed the column to single line and your formula worked!!

 

But i get error from Flow now Smiley Sad 

 

Can we make a formula work if Staff column is "Person"

 

Thank you!!

Community Support Team
Community Support Team

Re: Gallery filter based on emails is not working

Hi @DarkLord22 ,

 

If your Staff is one person type you can try the formula expression as this:

Filter('20190221staffcurrentemail',User().Email in ShowColumns(Staff_Person,"Email"))  (on my side)

On your side:

Filter('ICT Equipment',User().Email in ShowColumns(Staff,"Email"))  

 

Hope this can be helpful.

Best Regards.

Yumia

DarkLord22
Level: Powered On

Re: Gallery filter based on emails is not working

I am not sure what i am doing wrong but it is not working...

 

I managed to do the filter for the staff column (recreated it to singe line)

 

now i am stuck in the filter for the approvers.

 

Filter('ICT Equipment', User().Email in ShowColumns('ICT Equipment',"Supervisor","HoU","Budget_Approver"))

 

This is not working Smiley Sad 

all three columns are person.

 

even like this it is not working

 

Filter('ICT Equipment', User().Email in ShowColumns('ICT Equipment',"Supervisor"))

 

I cant change the columns to single line since it will ruin the whole app.. 

 

Any ideas?

 

Thank you!

 

 

Community Support Team
Community Support Team

Re: Gallery filter based on emails is not working

Hi @DarkLord22 ,

 

Could you please share more details about your persontype , do they allow multiple selections,if yes you can use

ShowColumns( 'Persontype column name', "Email"),

If not just:

Filter('ICT Equipment',User().Email in Staff.Email)

 

Could you please check whehter your person type column allow multiple selections?

20190221filtercurrentuser.PNG

 

 

Hope this can be helpful.

Best Regards.

Yumia

DarkLord22
Level: Powered On

Re: Gallery filter based on emails is not working

Allow multiple columns is disabled in all 3 columns.

 

Filter('ICT Equipment', User().Email in Supervisor) is not working.. Smiley Sad

 

really thx for the support! 

Capture2.JPG

Community Support Team
Community Support Team

Re: Gallery filter based on emails is not working

Hi @DarkLord22 ,

 

From your formula expression,I think you have missed .Email:

Filter('ICT Equipment', User().Email in Supervisor.Email)

 

Best Regards.

Yumia

DarkLord22
Level: Powered On

Re: Gallery filter based on emails is not working

It worked! but i need to check all three colums...

Filter('ICT Equipment', User().Email in Supervisor.Email,Budget_Approver.Email,Reviewing_Officer.Email)

 

How i can make this work??

 

Thank you!!