Refer to a checkbox on a modal from a listView in a query?

I am having trouble refering to a checkbox in my query. It is on a modal that is on a listView. It looks like the checkbox data is an array. Presumably because it is "connected" to the listView? (The size of the array matches). Therefore I am using the i variable.

Using {{RestrictToEvent[i].value}}=FALSE does not seem to work.

If I hover with the mouse I can inspect the array of data and the value for the current index, i, is indeed correct (either true or false accordingly).

What am I missing?

shouldn't it be

{{RestrictToEvent[i].value== false}}

Tried that too!

So this causing the query to break? Maybe if you can set that value to a temporary state and see what it looks there and take that value if it looks correct….

Turns out I think the answer was {{RestrictToEvent[i].value}}='false'

Quotations required!


@jclutterbuck it sounds like you may have a good workaround there, nice! Thanks @ScottR for your comments here as well. Just in case useful another potential way to write this could be along the lines of WHERE (ObjectID = {{[i]}} AND {{!RestrictToEvent[i].value}}) which is similar to the logic in the last example here in our docs. That second statement should only return True if the checkbox is toggled to False.

Thanks @kbn,

Very useful.


1 Like