# Setting a default value to an entry component

**URL:** <https://community.glideapps.com/t/setting-a-default-value-to-an-entry-component/82406>\
**Category:** Ask for Help\
**Created:** [June 11, 2025, 4:13pm UTC](https://community.glideapps.com/t/setting-a-default-value-to-an-entry-component/82406 "2025-06-11T16:13:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Rendon](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gustavo_rendon/32/87772_2.png) [@Gustavo\_Rendon](https://community.glideapps.com/u/Gustavo_Rendon)\
**Post date:** [June 11, 2025, 4:13pm UTC](https://community.glideapps.com/t/setting-a-default-value-to-an-entry-component/82406/1 "2025-06-11T16:13:26Z")

</div>

Hi all,

I’m building an app to calculate the manufacturing costs of some products. I’ve run into an issue with setting default values in my “Crear cotizacion” screen.

Here’s my current setup:

A “Products” table containing details for many different products (e.g., name, net weight, load weight, color).  
A “Quote” table with a single row that holds the data for the quote being generated on the “Crear cotizacion” screen.

On the “Crear cotizacion” screen, I have several fields. Some are for user input and others are calculated. For instance:

`peso_pieza` (Part Weight): A user-input field.  
`peso_colada` (Load Weight): A user-input field.  
`peso_total` (Total Weight): A calculated field that is the sum of `peso_pieza` and `peso_colada`.

I also have a choice component that allows the user to select a product from the “Products” table.

My goal is to have the `peso_pieza` and `peso_colada` fields automatically populate with the default weight values from the “Products” table whenever a product is selected. The user should still be able to modify these default values if needed.

Also I’m looking for a way to dynamically update the default values in the `peso_pieza` and `peso_colada` entry fields based on the product chosen from the dropdown menu. I’ve searched the documentation and community forums but haven’t found a solution.

Any help is appreciated

 ![screenshot-glide-1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/7/b76b4ad1f7e4f7eab84448a95d74b55510ff554c.png)

---

<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:** [June 11, 2025, 5:05pm UTC](https://community.glideapps.com/t/setting-a-default-value-to-an-entry-component/82406/2 "2025-06-11T17:05:49Z")

</div>

Selecting an item in a choice component will not execute an action to set other values. You can dynamically control the filter for those other choice components, but that’s about it unless you have a button or something that the user clicks after each choice.

It may be possible if you create a custom AI component to simulates the choice component and allows it to run an action that will set subsequent values.

---

<div class="post-metadata">

**Author:** ![Gustavo\_Rendon](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gustavo_rendon/32/87772_2.png) [@Gustavo\_Rendon](https://community.glideapps.com/u/Gustavo_Rendon)\
**Post date:** [June 11, 2025, 7:04pm UTC](https://community.glideapps.com/t/setting-a-default-value-to-an-entry-component/82406/3 "2025-06-11T19:04:22Z")

</div>

Thanks for the reply.

I had tried actions, but even that I created a relation between tables, in the action only allows me to set values from the same target table.

I may need a different approach to this.

---

<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:** [June 12, 2025, 12:00am UTC](https://community.glideapps.com/t/setting-a-default-value-to-an-entry-component/82406/4 "2025-06-12T00:00:55Z")

</div>

An AI component is the closest thing here.

Firstly, I would suggest a custom form.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particular…

Add fields for `producto`, `peso_pieza` and `peso_colada` (basic columns).

Use relations & lookup to pull back peso\_colada and peso\_pieza for the chosen product.

Add an AI component, connect the lookup fields and the basic column fields for `peso_pieza` and `peso_colada`. Tell it to write to the basic columns whenever the lookup fields are changed. Also tell it to not generate anything on the front end and set the height to 0.

---

<div class="post-metadata">

**Author:** ![Gustavo\_Rendon](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gustavo_rendon/32/87772_2.png) [@Gustavo\_Rendon](https://community.glideapps.com/u/Gustavo_Rendon)\
**Post date:** [June 12, 2025, 12:10pm UTC](https://community.glideapps.com/t/setting-a-default-value-to-an-entry-component/82406/5 "2025-06-12T12:10:06Z")

</div>

Hey, thanks a lot.  
I will try that.  
Cheers

---

<div class="post-metadata">

**Author:** ![Gustavo\_Rendon](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gustavo_rendon/32/87772_2.png) [@Gustavo\_Rendon](https://community.glideapps.com/u/Gustavo_Rendon)\
**Post date:** [June 12, 2025, 3:53pm UTC](https://community.glideapps.com/t/setting-a-default-value-to-an-entry-component/82406/6 "2025-06-12T15:53:52Z")

</div>

So based on what you guys wrote. I finally made it work.  
I created a relation and a Single value column for each field that looks for the record on the Products table, which I used for the default of the entry component. I created a button under the Products dropdown that runs a workflow that updates the fields based on the selected option. Might not be elegant but it does the trick.

Thanks for your help.
