cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

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
Highlighted
Community Support
Community Support

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
Anonymous
Not applicable

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.

Highlighted
Community Support
Community Support

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
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,125)