How should I use both Show and Hide actions on the same element?

I have a button which I want to show if the logged in user has the right permission. I also want to hide it if a variable has a particular value. But, the Show action seems to take priority and shows the button because of the logged in status despite me wanting to hide it.

So, what’s the technique for combining the two conditions into the same action? eg. Show if logged in user has permission AND variable is not set.

Cheers, Jon.

Hi @sitestreet
You can do something like:

dmx-show="user.identity && !var1.value"
1 Like

Perfect. I was on the right track but made a schoolboy error with my brackets! I was using the Data Formats dialog but had my second condition nested after the first instead of in line with it. Doh!

Many thanks for the speedy response.

1 Like

Interestingly (possible bug?) if I open the Data Formats dialog again, the ! has been removed.