Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Filter Datatable Records by checkbox value

Good day. 


I have a PowerApp which is showing data from a sharepoint lists. The data is filtered by a search textbox, 

and i got the Filtering of records running. 


search screen.PNG


As you can see on the screen, i have 2 checkboxes , Migrated and Deferred. I would like to use this checkboxes

to filter the records to show items that have a Status.Value = MIgrated or Deferred. 


My formula for my datatable is:


datatable item filter formula.PNG


I want my formula to be like: 



Filter('SDrive Shares', ("Migrated" in Status.Value) && ( txtsearch.Text in Path || txtsearch.Text in Owner.DisplayName || txtsearch.Text in Status.Value ))


But i do not know how to implement this one of the formula bar. If the Deferred  checkbox is true, then i also need to add that additional condition. 


I tried using a Context variable to store a string value  (ex: var1 = " 'migrated' in status.value"), and put that variable in the filter condition, but it is not working. 


I also tried to use RULES, but it will not allow me to modify the Filter Formula of the Datatable upon defining my action. 

I did not see any related posts similar to my issue. 


Hope anyone can help me solve my problem. 


Thank you, 

Yours sincerely, 



PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Filter Datatable Records by checkbox value

You can use something along the lines of:

    'SDrive Shares',
    txtsearch.Text in Path || txtsearch.Text in Owner.DisplayName,
    (comboboxMigrated.Value && Status.Value = "Migrated") ||
(comboboxDeferred.Value && Status.Value = "Deferred") ||
(Status.Value <> "Migrated && Status.Value <> "Deferred"))

This will return all the items in the 'SDrive Shares' list where either the path or the owner's display name contains the search text, and at least one of the three conditions is true: the status is migrated, and the appropriate combobox is selected; the status is deferred, and the corresponding combobox is selected; or the status is anything else.