I have created a gallery and want to filter it based on a value in a related list.
The primary list is named TicketList and contains a column named TicketStatus which is a lookup column to the StatusList list. The StatusList list includes a column named Open which is a binary column.
I want to filter the gallery to only include those TicketList items which have a TicketStatus that is set to Open=true in the StatusList list.
@OldDogNewTricks thanks that is clearer.
You can leverage the (non-delegable) Add Columns function to achieve this:
With(
{
_modified_data: AddColumns(
TicketList,
"status_text",
TicketStatus.Value
)
},
With(
{
_data: AddColumns(
_modified_data,
"isOpen",
LookUp(
StatusList,
StatusList[@Status] = _modified_data[@status_text],
Open
)
)
},
Filter(
_data,
isOpen
)
)
)
@Amik It's not quite that straight forward. "Open" is a binary column of the list StatusList (See the attached).
I'm interested in filtering the value in another list that is a lookup to the StatusList for each item that has a value that is flagged as open (the Open Column is true).
@OldDogNewTricks - I might be reading this too simply, but have you considered using:
Filter(
TicketList ,
TicketStatus.Value = "Open"
)