# Toggle Custom Button

**URL:** <https://resource.dopus.com/t/toggle-custom-button/14764>\
**Category:** Help & Support\
**Created:** [January 15, 2013, 11:55am UTC](https://resource.dopus.com/t/toggle-custom-button/14764 "2013-01-15T11:55:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lemmy](https://resource.dopus.com/user_avatar/resource.dopus.com/lemmy/32/26235_2.png) [@lemmy](https://resource.dopus.com/u/lemmy)\
**Post date:** [January 15, 2013, 11:55am UTC](https://resource.dopus.com/t/toggle-custom-button/14764/1 "2013-01-15T11:55:38Z")

</div>

I have a custom button with the following:

Set HIDEFILTERFILENAME \*.(bak|sfk|vf|gif)  
Set GROUPBY=type  
Set VIEW=Tiles

When I hit the button, all works as intended. However, when I hit it again to switch off the filter/group/view commands and bring the folder back to the defaults, the hidefiltername toggles back to showing all but the grouping and and view do not.

What's the method?

---

<div class="post-metadata">

**Author:** ![lemmy](https://resource.dopus.com/user_avatar/resource.dopus.com/lemmy/32/26235_2.png) [@lemmy](https://resource.dopus.com/u/lemmy)\
**Post date:** [January 17, 2013, 10:21am UTC](https://resource.dopus.com/t/toggle-custom-button/14764/2 "2013-01-17T10:21:31Z")

</div>

Anyone? Or is this a stupid question 😕

---

<div class="post-metadata">

**Author:** ![Jon](https://resource.dopus.com/user_avatar/resource.dopus.com/jon/32/12713_2.png) [@Jon](https://resource.dopus.com/u/Jon)\
**Post date:** [January 17, 2013, 11:50am UTC](https://resource.dopus.com/t/toggle-custom-button/14764/3 "2013-01-17T11:50:42Z")

</div>

As you have them written, the Set GROUPBY and Set VIEW commands do not toggle, whereas Set HIDEFILTERFILENAME does.  
See the manual for details on how to make the other commands toggle. The alternative would be to use @ifset and provide the two group/view modes separately.

---

<div class="post-metadata">

**Author:** ![AlbatorV](https://resource.dopus.com/user_avatar/resource.dopus.com/albatorv/32/25847_2.png) [@AlbatorV](https://resource.dopus.com/u/AlbatorV)\
**Post date:** [January 17, 2013, 11:53am UTC](https://resource.dopus.com/t/toggle-custom-button/14764/4 "2013-01-17T11:53:01Z")

</div>

Something like this

`Set HIDEFILTERFILENAME *.(bak|sfk|vf|gif)
Set GROUPBY=type,toggle
Set VIEW=Tiles,details`

---

<div class="post-metadata">

**Author:** ![lemmy](https://resource.dopus.com/user_avatar/resource.dopus.com/lemmy/32/26235_2.png) [@lemmy](https://resource.dopus.com/u/lemmy)\
**Post date:** [January 17, 2013, 8:03pm UTC](https://resource.dopus.com/t/toggle-custom-button/14764/5 "2013-01-17T20:03:49Z")

</div>

> [@](#):
>
> See the manual for details on how to make the other commands toggle.

I confess to being thick as two short planks but I did read the manual and search (I always do) and didn't sort out how to do it. I was looking for toggle but...........

Set HIDEFILTERFILENAME \*.(bak|sfk|vf|gif)  
Set GROUPBY=type,toggle  
Set VIEW=Tiles,details

that explains it. I still don't see why the first line toggles but as I said, thick.

Thanks for that.

---

<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:** [January 17, 2013, 8:11pm UTC](https://resource.dopus.com/t/toggle-custom-button/14764/6 "2013-01-17T20:11:31Z")

</div>

Commands that set a filter automatically act as toggles, but most other commands don't (and sometimes can't, e.g. "Set VIEW=Tiles" on its own wouldn't know what the second mode you wanted to toggle to was).
