# Is there any way to emulate a default value for choice component outside a form?

**URL:** <https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886>\
**Category:** Ask for Help\
**Created:** [February 16, 2021, 5:07pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886 "2021-02-16T17:07:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rasha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rasha/32/4585_2.png) [@Rasha](https://community.glideapps.com/u/Rasha)\
**Post date:** [February 16, 2021, 5:07pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/1 "2021-02-16T17:07:48Z")

</div>

Answer is likely no. Threads on this topic pre-date default being an option in forms themselves. I’m wondering if anyone has found a a trickaroo.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 16, 2021, 5:21pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/2 "2021-02-16T17:21:13Z")

</div>

If you can set an action to fill the column on the way to that screen, then that would essentially be like setting a default. I do this with one of my apps where I have a custom made form. I have a compound action that sets the columns values before performing a link to screen action to open the “form”.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [February 16, 2021, 5:24pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/3 "2021-02-16T17:24:14Z")

</div>

I was going to give you a tip but Jeff wrote almost the same I was thinking.

This is the way!

Saludos

---

<div class="post-metadata">

**Author:** ![Rasha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rasha/32/4585_2.png) [@Rasha](https://community.glideapps.com/u/Rasha)\
**Post date:** [February 16, 2021, 5:39pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/4 "2021-02-16T17:39:05Z")

</div>

This may work. It’s an inline list \> view details \> choice component. So I’m thinking the default view details action would have to be replaced with a custom action to (a) set the default, (b) open detail view.

Thanks Jeff and @gvalero.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 16, 2021, 5:41pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/5 "2021-02-16T17:41:50Z")

</div>

Correct, and if needed, you could probably add an IF statement to only set the default if it’s empty. Else it would keep any previously set value.

---

<div class="post-metadata">

**Author:** ![Rasha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rasha/32/4585_2.png) [@Rasha](https://community.glideapps.com/u/Rasha)\
**Post date:** [February 16, 2021, 6:00pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/6 "2021-02-16T18:00:56Z")

</div>

I would want the default to reset every time a user navigates to that detail view. So to use an example from the table in [this](https://community.glideapps.com/t/empty-required-filtered-choice-component-preventing-form-submission/22205/21) thread, **Choice 1 - Dockage** should always show **Anchorage** as default value. I think that can be achieved with an ITE as well…

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 16, 2021, 9:46pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/7 "2021-02-16T21:46:30Z")

</div>

Exacely! I have asked @JackVaughan and @Mark for this very thing just last week. In fact, would love a “default value” for every entry-type component regardless of whether it’s in a form or in a details page.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [February 16, 2021, 9:51pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/8 "2021-02-16T21:51:38Z")

</div>

How would a default value in a details screen work? Let’s say the default value for column `Name` is “Alice”. I open the page for a row where `Name` is empty. Do I see “Alice”? Does it write “Alice” to the table?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 16, 2021, 11:19pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/9 "2021-02-16T23:19:26Z")

</div>

My use case for this is details page where I dynamically show the user two sets of things. Let’s say a 1v1 chat where one can choose to chat via the comments component, or make a booking via a Webview component.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 16, 2021, 11:26pm UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/10 "2021-02-16T23:26:54Z")

</div>

Hm…well…perhaps… 😶

---

<div class="post-metadata">

**Author:** ![Rasha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rasha/32/4585_2.png) [@Rasha](https://community.glideapps.com/u/Rasha)\
**Post date:** [February 17, 2021, 12:12am UTC](https://community.glideapps.com/t/is-there-any-way-to-emulate-a-default-value-for-choice-component-outside-a-form/22886/11 "2021-02-17T00:12:02Z")

</div>

Using this example to explain what _default_ could look like:

\*ignore red square

 ![docks](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/7/b707c95c98d7e421a694a6b9495cf66f32175fef.png)

  

 ![defaults](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/1314cda2fbf88f021b15ab3b0c7bdac7b4c0d9ac.jpeg)

  

In a scenario where all 3 options (Anchorage, Mooring, Dock) for **choice 1** are available, the default displayed to the user would be Anchorage (“Alice”). If Anchorage is unavailable as option 1, the default could be Mooring, and so on. The “default” is conditional depending on the use case and not static (e.g. first row, à la single value column). Else if Alice is empty as you suggest, nothing would display. Same applies to Choice 2 and 3.

Cascading, conditional defaults (with Jeff’s tip) are achievable but amount to ~25 columns for 3 option groups.

[EDIT]

The “why” is worth mentioning: A pre-populated choice component drives action and minimizes decision fatigue in apps that are input heavy by nature. Every little bit helps.
