# Hide button with @hideif unless a variable is set a particular value

**URL:** <https://resource.dopus.com/t/hide-button-with-hideif-unless-a-variable-is-set-a-particular-value/36475>\
**Category:** Help & Support\
**Created:** [August 22, 2020, 3:31pm UTC](https://resource.dopus.com/t/hide-button-with-hideif-unless-a-variable-is-set-a-particular-value/36475 "2020-08-22T15:31:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyilmaz](https://resource.dopus.com/user_avatar/resource.dopus.com/cyilmaz/32/51438_2.png) [@cyilmaz](https://resource.dopus.com/u/cyilmaz)\
**Post date:** [August 22, 2020, 3:31pm UTC](https://resource.dopus.com/t/hide-button-with-hideif-unless-a-variable-is-set-a-particular-value/36475/1 "2020-08-22T15:31:59Z")

</div>

I want to check a global variable, say $glob:myvar (it's actually an environment variable, not a path or related to any DOpus lister state or alike but I copy it to a DOpus var) and if it doesn't match a certain value I want to hide a button. @hideif seems to be the solution, but I can't figure out the notation or if it's possible at all.

I checked out the documentation and found [this thread](https://resource.dopus.com/t/using-hideif/23717/12), which shows how to hide the button if a global variable is set, regardless of the value. My wish is kind of the opposite, something like  
@hideif:!$glob:myvar=PARTICULAR\_VALUE  
How can I do it?  
ps: DOpus version 12.21

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [August 22, 2020, 3:36pm UTC](https://resource.dopus.com/t/hide-button-with-hideif-unless-a-variable-is-set-a-particular-value/36475/2 "2020-08-22T15:36:19Z")

</div>

@hideif can only test if a variable is set or not, not what the value is, but you could make the thing that converts the env-var create different variables based on the env-var's value to do what you need.

---

<div class="post-metadata">

**Author:** ![cyilmaz](https://resource.dopus.com/user_avatar/resource.dopus.com/cyilmaz/32/51438_2.png) [@cyilmaz](https://resource.dopus.com/u/cyilmaz)\
**Post date:** [August 22, 2020, 3:41pm UTC](https://resource.dopus.com/t/hide-button-with-hideif-unless-a-variable-is-set-a-particular-value/36475/3 "2020-08-22T15:41:38Z")

</div>

Thanks for the very quick reply.  
I feared that you might say that. It's the exit code of program I wrote, it has dozens of possible values (N) and for each button for a different particular value I'd need to have N-1 @set & @hideifs 😑  
Maybe I'll figure out another way.
