cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hackondor
Frequent Visitor

Gallery Filter by Multiple Check boxes

Hi All,

 I have a simple gallery with 2 Filter 1 Search and 3 Checkboxes

 

hackondor_0-1619047076055.png

 

- My Collection (MasterLocalCollection)

- SBU ( Combobox Single choice)

- Manager (Combobox Multi-choices)

- Search (For 2 column: "Project_x0020_Name", "Project_x0020_Description"  )

- Prepare & Execute & Close Are simple checkboxes

 

I'm trying to combine all those filters, so far everything works well but I'm struggling to combine the Multi-select for my 3 checkboxes

 

NB: I'm using Left() to check the 2 first characters for the Current_x0020_Project_x0020_Phas column

 

 

Ungroup(
    ForAll(
        RenameColumns(
            FilterByManager.SelectedItems,
            "Result",
            "CurrentFilterValue"
        ),
        {
            ItemsGroupedByFilterValue: Search(Filter(
                MasterLocalCollection,
                FilterByManager.Selected.Result="All" Or IS_x0020_Project_x0020_Manager_x = CurrentFilterValue,
                FilterBySBU.Selected.Value="All" Or Main_x0020_Sub_x0020_Business_x0.Value=FilterBySBU.Selected.Value,
                //Checkboxes
                Checkbox_Prepare.Value=false Or Left(Current_x0020_Project_x0020_Phas.Value,2) = "P1" || Left(Current_x0020_Project_x0020_Phas.Value,2) = "P2" || Left(Current_x0020_Project_x0020_Phas.Value,2) = "P3",
                Checkbox_Execute.Value=false Or Left(Current_x0020_Project_x0020_Phas.Value,2) = "PW" || Left(Current_x0020_Project_x0020_Phas.Value,2) = "PA",
                Checkbox_Close.Value=false Or Left(Current_x0020_Project_x0020_Phas.Value,2) = "P6"
            ),SearchByNameAndDesc.Text, "Project_x0020_Name", "Project_x0020_Description")
        }
    ),
    "ItemsGroupedByFilterValue"
)

 

 

 

 

How can I achieve that?

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
PatilChetan
Resolver II
Resolver II

@hackondor 

 

Refer the post: https://powerusers.microsoft.com/t5/Building-Power-Apps/Checkbox-as-search-refiners/m-p/891444/highl... 

 

Updated code, added ComboBox Selected Values condition:

App - Saved (Unpublished) - Power Apps - Personal - Microsoft​ Edge 4_22_21 11_56_22 AM.png

 

Regards,

Chetan

View solution in original post

2 REPLIES 2
PatilChetan
Resolver II
Resolver II

@hackondor 

 

Refer the post: https://powerusers.microsoft.com/t5/Building-Power-Apps/Checkbox-as-search-refiners/m-p/891444/highl... 

 

Updated code, added ComboBox Selected Values condition:

App - Saved (Unpublished) - Power Apps - Personal - Microsoft​ Edge 4_22_21 11_56_22 AM.png

 

Regards,

Chetan

Hi @PatilChetan ,

Thank you for your reply

It's working see below 

hackondor_0-1619127054647.png

hackondor_1-1619127100126.png

 

I want to compare with the first characters like: 

Left(Current_x0020_Project_x0020_Phas.Value,2) = "P1"

 

Is there any way to achieve that, I've tested with Left, Starwith but nothing work.

 

Any ideas?

 

 

 

 

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (3,749)