cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

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
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
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (6,877)