# Default value in form is lost

**URL:** <https://community.glideapps.com/t/default-value-in-form-is-lost/73127>\
**Category:** Ask for Help\
**Created:** [May 6, 2024, 9:21pm UTC](https://community.glideapps.com/t/default-value-in-form-is-lost/73127 "2024-05-06T21:21:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hadassi82](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hadassi82/32/73293_2.png) [@hadassi82](https://community.glideapps.com/u/hadassi82)\
**Post date:** [May 6, 2024, 9:21pm UTC](https://community.glideapps.com/t/default-value-in-form-is-lost/73127/1 "2024-05-06T21:21:29Z")

</div>

Hi,

I have create a form to add records (for example trading cycles).  
Each cycle has a column of stock and a column of cycle (number).  
So in the stock details screen I have created a navigation button to the “Add cycle” form and defaulted the stock to the current stock data I am in.  
Everything looks good, but when I type the cycle number in the form - the defaulted stock value disappears.

Any idea why?

I have made a screen recording to demonstrate the issue:

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/b/2bc63af8c215c891f6675ad631d19f1f3ccb18a8.jpeg "Recording 2024 05 07 001644") ](https://www.youtube.com/watch?v=SCF5w7M1c14)

Thank you!

---

<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:** [May 6, 2024, 10:11pm UTC](https://community.glideapps.com/t/default-value-in-form-is-lost/73127/2 "2024-05-06T22:11:12Z")

</div>

I’m guessing your Cycle Number entry is pointing to the same column that the Stock column is writing to. Can you show how the form is configured?

---

<div class="post-metadata">

**Author:** ![hadassi82](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hadassi82/32/73293_2.png) [@hadassi82](https://community.glideapps.com/u/hadassi82)\
**Post date:** [May 6, 2024, 10:52pm UTC](https://community.glideapps.com/t/default-value-in-form-is-lost/73127/3 "2024-05-06T22:52:58Z")

</div>

I now notice that it does not allow me to select a column from the cycle table to write to… It only allows columns from the user table from some reason:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/3/032ebe81e5249a93cca37710fd9fb8a878e8c6ef.jpeg)

The source table is the stock table but I want to write to the cycle table.

---

<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:** [May 6, 2024, 10:56pm UTC](https://community.glideapps.com/t/default-value-in-form-is-lost/73127/4 "2024-05-06T22:56:35Z")

</div>

Then that means your form is not configured to write to the correct table. Change the table the form writes to.

---

<div class="post-metadata">

**Author:** ![hadassi82](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hadassi82/32/73293_2.png) [@hadassi82](https://community.glideapps.com/u/hadassi82)\
**Post date:** [May 6, 2024, 11:02pm UTC](https://community.glideapps.com/t/default-value-in-form-is-lost/73127/6 "2024-05-06T23:02:19Z")

</div>

I think I found how to do that but the problem is that when I add a stock I want to add it to the stock table, but by clicking this button placed in the stock details I wanted to navigate to a form that will write to the cycle table…

---

<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:** [May 6, 2024, 11:44pm UTC](https://community.glideapps.com/t/default-value-in-form-is-lost/73127/7 "2024-05-06T23:44:18Z")

</div>

A form can write to any table you want. You just need choose the correct destination table.

 ![Screenshot_20240506-184023](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/6/2666b4d17ea7fd2bcc1d070aeec8ecf80617e4e9.png)

Also, your form doesn’t need a choice component for the stock. You can automatically pass it through the form as a column value component. Just add it like any other component and choose the component that contains your stock value.

 ![Screenshot_20240506-184223](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/0/20a384b26f52ef23c33da15db0d0c64face30ce7.jpeg)

---

<div class="post-metadata">

**Author:** ![hadassi82](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hadassi82/32/73293_2.png) [@hadassi82](https://community.glideapps.com/u/hadassi82)\
**Post date:** [May 7, 2024, 4:03am UTC](https://community.glideapps.com/t/default-value-in-form-is-lost/73127/8 "2024-05-07T04:03:04Z")

</div>

Thank you. Jeff.  
To be honest, I am not quite sure what I did but your instructions helped me in the right direction and it is working now!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [May 14, 2024, 4:03am UTC](https://community.glideapps.com/t/default-value-in-form-is-lost/73127/9 "2024-05-14T04:03:22Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
