cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 76 members 3,286 guests
Please welcome our newest community members: