Expression to test for empty json query result

Is there a simple way to test if an json query result is empty? I need an expression to bind to the display property in perspective when the data in two tables is empty.

There are lots of ways, but this should do what you want. I only used one table, but the logic is the same:

You could also have an individual property for each table, something like TableOne.custom.hasData which performs the same logic as the previous screenshot, but only for one table. Then you just bind the visibility of the tables to {TableOne.custom.hasData} && {TableTwo.custom.hasData}.

Alternatively, you could do something like

!isNull({./TableOne.props.data[0]}) && !isNull({./TableTwo.props.data[0]})

Or

!isNull({./Table.props.data[0]}) || !isNull({./Table.props.data[0]})

if you want to not display something if EITHER of them are empty.

Thank you, that does exactly what i need. :grinning:

I tried to check the data property and did not think of testing the data[0] element before.