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

Filter Data table for a multiple values column

Hello,

 

I have a lookup column to a list and multiple values can be selected for that column. Based on the items selected, I want to display list items on the same screen. The plan is to use data table to pull the list. However, I am stuck with the filter formula to display only the chosen items. Can anyone please help?

 

Thank you.

Bhavpreet Bains

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter Data table for a multiple values column

Hi @Bhavpreet ,

Could you please share a bit more about your scenario?

Do you want to display SP List Items in a Data Table based on the selected values within the LookUp field ComboBox?

 

Based on the issue that you mentioned, I have made a test on my side, please take a try with the following workaround:

Set the Items property of the Data Table to following formula:

Filter(
        ReferencedList,
        ReferencedColumn in LookUpFieldComboBox.SelectedItems.Value
)

Note: I assume that the LookUp field that you mentioned, reference values from the ReferencedColumn in your ReferencedList.  The LookUpFiledComboBox represents the ComboBox control within the LookUp filed data card in your Edit form.

 

Please consider 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

2 REPLIES 2
Highlighted
shailendra74
Level 10

Re: Filter Data table for a multiple values column

Hi @Bhavpreet 

 

Try as follows:

 

ClearCollect(
    collTest,
    Filter(
        AddColumns(
            ShowColumns(
                samplelistapp,
                "Title",
                "Cstatus"
            ),
            "Status",
            Concat(
                Cstatus.Value,
                Value & ","
            )
        ),
        ComboBox2.Selected.ID in Cstatus.Id
    )
)
  1. OnSelect of a button I have the above code
  2. Set Items property of DataTable to collTest
  3. place a Combobox and set the Items property to the Lookup List (master list)

 

samplelistapp is my list and Cstatus is multiselect lookup column.

 

Thanks.

Community Support Team
Community Support Team

Re: Filter Data table for a multiple values column

Hi @Bhavpreet ,

Could you please share a bit more about your scenario?

Do you want to display SP List Items in a Data Table based on the selected values within the LookUp field ComboBox?

 

Based on the issue that you mentioned, I have made a test on my side, please take a try with the following workaround:

Set the Items property of the Data Table to following formula:

Filter(
        ReferencedList,
        ReferencedColumn in LookUpFieldComboBox.SelectedItems.Value
)

Note: I assume that the LookUp field that you mentioned, reference values from the ReferencedColumn in your ReferencedList.  The LookUpFiledComboBox represents the ComboBox control within the LookUp filed data card in your Edit form.

 

Please consider 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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 221 members 5,218 guests
Recent signins:
Please welcome our newest community members: