# Specify default selection for a choice component

**URL:** https://community.glideapps.com/t/specify-default-selection-for-a-choice-component/33878
**Category:** Feature Requests
**Created:** [November 1, 2021, 8:22pm UTC](https://community.glideapps.com/t/specify-default-selection-for-a-choice-component/33878 "2021-11-01T20:22:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Malcolm\_Lewis](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Malcolm\_Lewis](https://community.glideapps.com/u/Malcolm_Lewis)
#### Post date: [November 1, 2021, 8:22pm UTC](https://community.glideapps.com/t/specify-default-selection-for-a-choice-component/33878/1 "2021-11-01T20:22:46Z")

</div>

Apologies if this feature request is posted elsewhere. Lmk and I’ll vote there.

So, my home page has some filters. I’d like to have default selections for those filters for both logged-in and anonymous users. It seems very odd that there isn’t a Default selection attribute I can set when adding a Choice component to a screen.

Current UX for a first-time page visitor:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/b/5bec012367151407b7cf56141dae0357c7c221c3.jpeg)

Desired UX for a first-time page visitor:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/c/5ce3852f624bc9a939da49b1175c63dbc69a0065.jpeg)

I’m imaging a new field below `Values` that lets me enter a default value. To keep it simple, if the value is not valid (putting the onus on the developer to enter a valid value) then the current behavior persists — no selection is highlighted. That way adding this feature doesn’t break anything. I’ve read all kinds of wonky ways to work around this but it seems a simple Default attribute for the component would make life a lot simpler.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/b/9b365e7ef78ed5ea035fba81f928a8570cbae5e4.png)

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [November 1, 2021, 8:50pm UTC](https://community.glideapps.com/t/specify-default-selection-for-a-choice-component/33878/2 "2021-11-01T20:50:05Z")

</div>

Best solution will be to prefilled these values if empty, using custom action before going to that sreen

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [November 1, 2021, 11:49pm UTC](https://community.glideapps.com/t/specify-default-selection-for-a-choice-component/33878/3 "2021-11-01T23:49:46Z")

</div>

> [@Malcolm\_Lewis](#):
>
> I’ve read all kinds of wonky ways to work around this but it seems a simple Default attribute for the component would make life a lot simpler.

A default would be good, but providing your own defaults isn’t that difficult. Assuming that the choice component is writing to a user specific column, then:

- Create an if-then-else column:  
– If user specific column is empty, then default  
– Else user specific column
- And then use the value of the if-then-else column in place of the user specific column

I wouldn’t consider that a particularly wonky option 😉

---

<div class="post-metadata">

### Author: ![Malcolm\_Lewis](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Malcolm\_Lewis](https://community.glideapps.com/u/Malcolm_Lewis)
#### Post date: [November 1, 2021, 11:55pm UTC](https://community.glideapps.com/t/specify-default-selection-for-a-choice-component/33878/4 "2021-11-01T23:55:43Z")

</div>

Thanks. I’ll try that. Agree not terribly wonky 😉
