Container condition

hi
I am trying to NOT show a container if it HAS a query result.

For some reason it won’t work. I have tried it as condition and also as a show/hide attribute. I am using hasitems() and I know my query returns NO results as I run the same query in my sql profiler.

My conditional code is:

	<div class="container mb-5" is="dmx-if" id="conditional2" dmx-bind:condition="sc_UserJobSummary.data.q_UserJob_sel[0].deliverycomplete == 1 &amp;&amp; !sc_BookingReview.datasc_BookingReview.data.q_BookingReview.hasItems()">

so first to check if the booking is complete (==1) and then the query not hasItems using the ! at the front.

my sql shows it has no results (and is complete)

my SC query is identical

but the container I have this on always shows, even though it has no items in the query.

I also removed the condition and set it up as a show with the same conditions and the container always showed, again even with no results, i tried reversing it to hide and removed the !, same result.

is there a bug? or have I missed something fundamental? I have use the same type of code in other pages, other parts of this page (the hasItems) and it works, i am stumped

thanks
darren

Community Page
Last updated: