cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SeanHenderson
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
v-xida-msft
Community Support
Community Support

Hi @SeanHenderson ,

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
v-xida-msft
Community Support
Community Support

Hi @SeanHenderson ,

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,984)