Not able to show or hide elements

Wappler Version : 3.9.7
Operating System : MacOS 11.3
Server Model: Node
Database Type: MySQL
Hosting Type: Docker

Expected behavior

What do you think should happen?

I should be able to show and hide elements when table has items via the UI.
In PHP:

Actual behavior

What actually happens?

I can not find “Has items” in the user interface. If I use .hasItems() in code view
it works.
In node:

How to reproduce

  • Detail a step by step guide to reproduce the issue
  • A screenshot or short video indicating the problem
  • A copy of your code would help. Include: JS, HTML.
  • Test your steps on a clean page to see if you still have an issue
  1. Try to hide a row when DB has no rows.

Is this a single record result query?

Hi Dave,
Nope, multi result.
I just checked another project that’s built on PHP and if PHP the UI shows the Has Items option. But in node it does not.

What is the type of the expression shown? The icon on the left of text…
I have seen often that instead of array, it shows it as text, hence the missing formatter.

Hi,
Yes, its set to text. If I change it to array I get the option Has Items in the UI. But then its not working. The expression gets removed completely.

@JoakimAsk,

Just to be clear, this is a NodeJS project and not a PHP project, correct?

If it is NodeJS, then the wording has changed from hasitems to hasvalue, NodeJS show/hide dynamic attribute As @Dave pointed out with his question, the result needs to be multi-result and not single-result, which it appears from your answer it is.

Yes, its Node.js.
And the query is not single query.
I got it working by adding .hasItems() manually but not possible in UI.