cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Impactful Individual
Impactful Individual

Connecting Label to Filtered Gallery

Hi,

I have a gallery with multiple entries for each person in the gallery, so I set the Items property for the gallery to:

Distinct(Employees, Title)

Where Employees is the name of the SharePoint list I'm connected to and Title is the name of the column with the employee names. There are multiple entries in the list for each employee.

I want to create a label that shows the value for a selected employee, filtering for a particular value out of all the multiple records for that employee.

So the label should check for:

What employee has been selected in the gallery.

Out of the multiple records for that employee, look at column named 'Test' and find where the value is Test B.

In that row, show me what is in the 'Status' column.

 

Does that make sense? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Connecting Label to Filtered Gallery

Hi @SKH19 ,

Could you please share a bit more about the Status column in your Employees List? Is it a Single line text type column or Choice type column?

 

Based on the needs that you mentioned, I think LookUp function could achieve your needs.

 

I have made a test on my side, please take a try with the following workaround:

1. If the Status column is a Single line text type column:

Set the Text property of the Label control to following:

LookUp(Employees, Title = Gallery1.Selected.Result && Test = "Test B", Status)

or

LookUp(Employees, Title = Gallery1.Selected.Result && Test = "Test B").Status

 

2. If the Status column is a Choice type column:

Set the Text property of the Label control to following:

LookUp(Employees, Title = Gallery1.Selected.Result && Test = "Test B", Status.Value)

or

LookUp(Employees, Title = Gallery1.Selected.Result && Test = "Test B").Status.Value

 

In addition, if the Test column is also a Choice type column in your SP list, please modfiy above formula as below:

LookUp(Employees, Title = Gallery1.Selected.Result && Test.Value = "Test B", Status.Value)

or

LookUp(Employees, Title = Gallery1.Selected.Result && Test.Value = "Test B").Status.Value

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Connecting Label to Filtered Gallery

Hi @SKH19 ,

Could you please share a bit more about the Status column in your Employees List? Is it a Single line text type column or Choice type column?

 

Based on the needs that you mentioned, I think LookUp function could achieve your needs.

 

I have made a test on my side, please take a try with the following workaround:

1. If the Status column is a Single line text type column:

Set the Text property of the Label control to following:

LookUp(Employees, Title = Gallery1.Selected.Result && Test = "Test B", Status)

or

LookUp(Employees, Title = Gallery1.Selected.Result && Test = "Test B").Status

 

2. If the Status column is a Choice type column:

Set the Text property of the Label control to following:

LookUp(Employees, Title = Gallery1.Selected.Result && Test = "Test B", Status.Value)

or

LookUp(Employees, Title = Gallery1.Selected.Result && Test = "Test B").Status.Value

 

In addition, if the Test column is also a Choice type column in your SP list, please modfiy above formula as below:

LookUp(Employees, Title = Gallery1.Selected.Result && Test.Value = "Test B", Status.Value)

or

LookUp(Employees, Title = Gallery1.Selected.Result && Test.Value = "Test B").Status.Value

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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