Filter Data Table on boolean column

I can’t figure out how to filter a list (data table) based on the value in a boolean column in the table.
I tried using the ‘Where’ clause, but can’t figure out how to specify the boolean properly.

The where clause syntax for boolean columns would be:

boolean-column-name = true


boolean-column-name = false

Thanks for the reply. I get how to test a boolean. I just can’t figure out how to do it UI Builder.

For example, when I grab a logic ‘puzzle piece’, it won’t plug in (won’t accept) to the ‘where clause’.

Here’s my table:

Here’s my UI page with Data Table and Where Clause:

Here’s the result of running the page:

Does it help?


Oh, I see what you mean.

I have a row within a dynamic list, which is how I’m displaying the contents of the table (sorry for not being more clear in my question… I’m new to Backendless), so I don’t have an actual Data Table on the page.

What I have in mind is using a toggle and filtering the list depending on the setting of the toggle. So, I’m trying to build the logic associated with the OnChange event for the toggle.

No worries. Could you please include a few screenshots or record a loom video to illustrate the issue a little better?

Sure, here are screenshots of the UI, with the toggle (near the top) and the logic for the toggle.

That clarifies it, thank you. The block you have in there evaluates to a string:

What you need is this:
Codeless - BL - ConsoleDemo - Backendless 2021-12-14 22-31-45

Gotcha… thx! It filtered the list when I put “ColumnName = true”.

So, if I want to filter the list differently, depending on the setting of the toggle, how do I do that? I tried pulling in the logic ‘test’, but I can’t figure out how to plug in the state of the toggle. Do I need to use a variable?

If you want to retrieve data from the table based on different criteria, you’d need to modify the where clause. Whether you use a variable, I do not know, variables are typically not the solution but an instrument to store some intermediate state in the flow of your logic.

Thanks, Mark.

This is where I’m at with the logic. I just don’t know what to plug in, for the state of the toggle, to the left side of the ‘test’. How can I plug in the state of the toggle?

Do you see the Changed Value block at the top? It is a context block and it contains the current state of the toggle. When the toggle is on, the block will be true, when it is off, the block has the value of false. So your logic would be this:
UI Builder - ConsoleDemo - Backendless 2021-12-15 11-57-26

However, since we always aim for simplicity (and elegance), I’d recommend using the following logic construct:
UI Builder - ConsoleDemo - Backendless 2021-12-15 11-59-13