How is this possible? Current value is wrong

ARGGGH. Driving me nuts. I’m trying to display a pop-up sidebar when a variable called “show_admin_menu” is set to “true”. Please see attached editor image. The variable is currently set to “true” and yet my formula is returning a current value of false and the pop-up sidebar is not displaying.

And it doesn’t seem to matter if I apply this display condition on the Edit tab or the Conditional Rendering section of the settings tab.

You need to check for true without the quotation marks.

What WeWeb does is when you put equals (=) as a nocode formula, it compares strictly which means that it actually checks also the data type, you’re comparing a boolean to a string (since you’re using quotation marks).

What you actually can do, but defies the purpose of doing this, is you can turn the show_admin_menu.toString() so “true” === “true”

Screenshot 2023-10-16 at 22.39.13

TLDR; remove the quotes and make it just true without " "

3 Likes

What @Broberto said. :crazy_face:

1 Like

Or simplify it further and just return the value of ‘show_admin_menu’.

Because it is a bool its either going to display when true, and hide when false. You don’t need to do a test for it at all.

2 Likes

thanks @Broberto & @MichaelLovell ! Much appreciated! This community is the best! :grinning:

2 Likes