# Change setting based on selection

**URL:** https://community.glideapps.com/t/change-setting-based-on-selection/53238
**Category:** Ask for Help
**Created:** [November 3, 2022, 3:36pm UTC](https://community.glideapps.com/t/change-setting-based-on-selection/53238 "2022-11-03T15:36:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bjgray](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bjgray/32/50137_2.png) [@bjgray](https://community.glideapps.com/u/bjgray)
#### Post date: [November 3, 2022, 3:36pm UTC](https://community.glideapps.com/t/change-setting-based-on-selection/53238/1 "2022-11-03T15:36:27Z")

</div>

I have a form that lets the user either toggle a switch OR choose from a list. I’d like it to force the switch to OFF if the user makes a selection from the list. And I’d like it to clear selections from the list if the switch is flipped ON.

I thought I had a solution by using visibility settings to hide the list if the switch was ON or hide the switch if a list item was selected. But of course that doesn’t clear the selections so I end up with input that includes both a TRUE from the switch and selected items from the list.

Any suggestions?

 ![Screen Shot 2022-11-03 at 11.14.57 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/d/cd650ccd88ad7bad452f29e4ffb014a2587b7f0e.png)

---

<div class="post-metadata">

### Author: ![bjgray](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bjgray/32/50137_2.png) [@bjgray](https://community.glideapps.com/u/bjgray)
#### Post date: [November 3, 2022, 5:21pm UTC](https://community.glideapps.com/t/change-setting-based-on-selection/53238/2 "2022-11-03T17:21:05Z")

</div>

I found a solution that works but maybe there’s a better way.

I added a button that appears only if items in the list are selected. The button clears the list, sets the switch to TRUE, and hides the list.

I added another button that appears only it the switch is on. The button sets the switch to FALSE and makes the list visible.

![Screen Shot 2022-11-03 at 1.14.07 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/0/d055b94556affa0499b56cdc6bd3b4394c831a91.png)  
 ![Screen Shot 2022-11-03 at 1.14.16 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/1/b1626db55796c5561684ffbae8fb3edf1d917498.png)
