cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gian1
New Member

Filtering ComboBox by Multiple choice ComboBox

Hi,

 

I need to filter a ComboBox by a Multiple choice ComboBox

 

ComboBox1 items looks like this:

 

 

Distinct('SharepointList'.Column;Column)

 

 

I use the Distinct because i use a column for categories.

ComboBox2 items looks like this:

 

 

Filter('SharepointList'; Column = ComboBox1.Selected.Result)

 

 

The problem is that in the way the filter is acting it only shows the items corresponding to the last choice that was selected in ComboBox1 but i need all the items of each of the selected choices. On top of that, i was testing the form in the SharePoint List and it wasn't saving the new items that i was selecting in the ComboBoxes

I have been looking for an answer but i didn't find it or it wasn't my case so i couldn't apply any solution.

 

Appreciate any kind of help, Thanks

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@Gian1,

Based on the issue that you mentioned, do you want to display all the items corresponding to the selections from the ComboBox1?

Combine that with the second formula you provided, It does only display the last selected choice from the ComboBox1. I think there is something wrong with the Filter() syntax. I have a test on my side, please modify your formula as below.

• Set the ComboBox1.Items property as :

 Distinct('SharepointList',ColumnName)

• Set ComboBox2.Items property as: 

Filter('0608', ColumnName in ComboBox1.SelectedItems.Result)

9.png

Note: Make sure that you have set the DisplayFields & SearchFields as:

[“ColumnName”]

After that, you can see selections in ComboBox2 after you select some items in ComboBox1.

Now let’s move to the second issue that you mentioned, do you mean that selected items are not saved to SP list when you submit?

Could you please share more about your column type, is it a Text or any other else?

I assume that it is a Text column, please take a try as below:

  • Set the Update property of this column data card in the form as: 
ComboBox1.Selected.Result​
  • Set the DefaultSelectedItems property of the ComboBox1 as:
  • {ColumnName:ThisItem.ColumnName}​

     

    Best Regards,

    Qi

     

    View solution in original post

    4 REPLIES 4
    WarrenBelz
    Super User III
    Super User III

    Hi @Gian1 ,

    Firstly, you may get a Delegation warning on this due to the in filter

    Filter(
       'SharepointList'; 
       ComboBox1.SelectedItems in Column
    )

    Second, what is the Update property of the DataCard this is contained in?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

    v-qiaqi-msft
    Community Support
    Community Support

    Hi@Gian1,

    Based on the issue that you mentioned, do you want to display all the items corresponding to the selections from the ComboBox1?

    Combine that with the second formula you provided, It does only display the last selected choice from the ComboBox1. I think there is something wrong with the Filter() syntax. I have a test on my side, please modify your formula as below.

    • Set the ComboBox1.Items property as :

     Distinct('SharepointList',ColumnName)

    • Set ComboBox2.Items property as: 

    Filter('0608', ColumnName in ComboBox1.SelectedItems.Result)

    9.png

    Note: Make sure that you have set the DisplayFields & SearchFields as:

    [“ColumnName”]

    After that, you can see selections in ComboBox2 after you select some items in ComboBox1.

    Now let’s move to the second issue that you mentioned, do you mean that selected items are not saved to SP list when you submit?

    Could you please share more about your column type, is it a Text or any other else?

    I assume that it is a Text column, please take a try as below:

    • Set the Update property of this column data card in the form as: 
    ComboBox1.Selected.Result​
  • Set the DefaultSelectedItems property of the ComboBox1 as:
  • {ColumnName:ThisItem.ColumnName}​

     

    Best Regards,

    Qi

     

    View solution in original post

    @Gian1 ,

    Happy to respond when you provide the requested information,. Please tag me if you require my assistance.

    Hi @Gian1 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Helpful resources

    Announcements
    PA User Group

    Welcome to the User Group Public Preview

    Check out new user group experience and if you are a leader please create your group

    MBAS Attendee Badge

    Claim Your Badge & Digital Swag!

    Check out how to claim yours today!

    secondImage

    Demo Extravaganza is Back!

    We are excited to announce that Demo Extravaganza for 2021 has started!

    MBAS on Demand

    Microsoft Business Applications Summit sessions

    On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

    Top Solution Authors
    Top Kudoed Authors
    Users online (53,775)