Power Apps Exchange

Please login or click SIGN UP FOR FREE to create your PowerAppsUG account to join this user group.
 View Only
  • 1.  trouble Filtering a Gallery with combobox

    Silver Contributor
    Posted Mar 01, 2022 10:51 AM
    Hello is someone can explain me the difference between dropdown et combobox for filtering

    this is working : Filter('MySharepointList';Chauffeur.Value=drpdchauffeurs.SelectedText.Nom)

    this  not ... Filter('Planning Journalier Vehicules Nice';Chauffeur.Value=cbbx.SelectedItems.Nom)

    FOr the second I have the "=" is underlignesd with red line.

    Is someone have any clue ?

    Thank you

    ------------------------------
    Cyril B
    ------------------------------


  • 2.  RE: trouble Filtering a Gallery with combobox

    Posted Mar 02, 2022 03:00 AM
    Edited by Romain Pham-Hung Mar 02, 2022 03:10 AM

    Hi Cyril,

    A combobox will provide an array/list of result hence your filter won't know which record to use as argument in your Filter function.

    There is different ways to make it work:
    If you want to use only 1 item selected in the combobox (same behavior as the dropdown):
    - Set the combobox paramter for multiple selection to off and then you can use cbbx.Selected.Nom
    or
    - Change the formula to Filter('Planning Journalier Vehicules Nice';Chauffeur.Value=First(cbbx.SelectedItems.Nom).Nom)

    if you want the filter to take into account all the item selected in the combobox use the operator in
    Filter('Planning Journalier Vehicules Nice';Chauffeur.Value in cbbx.SelectedItems.Nom)
    The last option may have performance impact on the result loading

    Hope it helps



    ------------------------------
    Romain Pham-Hung
    Shanghai
    ------------------------------



  • 3.  RE: trouble Filtering a Gallery with combobox

    Silver Contributor
    Posted Mar 02, 2022 03:29 AM
    So many thank's I one for the explanation et second for the tips.
    I made it with your first choice:
    "Set the combobox paramter for multiple selection to off and then you can use cbbx.Selected.Nom"
    and it work fine.

    Thank you again

    ------------------------------
    Cyril B
    ------------------------------



  • 4.  RE: trouble Filtering a Gallery with combobox

    Posted Mar 02, 2022 04:32 AM
    Hi Cyril

    The difference with a Combo Box is that is has the capability to return multiple selections. This is why the "=" is an issue in your formula. If you replace "=" with "in" your filter should work.

    Let me know if it works,
    Anthony.

    ------------------------------
    Anthony Scanlon
    ------------------------------



  • 5.  RE: trouble Filtering a Gallery with combobox

    Silver Contributor
    Posted Mar 02, 2022 04:42 AM
    Hi Antjony thnak yoou for your reply
    It's working but not totally for me because I'm using a sharepoint list and the in is non delegable .....
    Thanks

    ------------------------------
    Cyril B
    ------------------------------