# When does Glide do math column recalc?

**URL:** <https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693>\
**Category:** Ask for Help\
**Created:** [December 13, 2022, 1:40pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693 "2022-12-13T13:40:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattJP](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattjp/32/47532_2.png) [@MattJP](https://community.glideapps.com/u/MattJP)\
**Post date:** [December 13, 2022, 1:40pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693/1 "2022-12-13T13:40:07Z")

</div>

“[The Math Column allows you to perform instant calculations on the data in your table.](https://www.glideapps.com/docs/reference/computed-columns/math-column)”

It looks to me like Add/Edit Screens don’t recalc these fields until they are submitted.  
Is that correct?

I haven’t tried a custom form because I’m not sure how to trigger a recalc.  
Is there a way to trigger a recalculation as soon as a dependant field is updated?

Thanks in advance

---

<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:** [December 13, 2022, 1:51pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693/2 "2022-12-13T13:51:43Z")

</div>

> [@MattJP](#):
>
> It looks to me like Add/Edit Screens don’t recalc these fields until they are submitted.  
> Is that correct?

Yes, that’s correct. Because nothing is actually written to the table until the form is submitted.

> [@MattJP](#):
>
> Is there a way to trigger a recalculation as soon as a dependant field is updated?

That will always happen, once the data is written to the table. So if you edit the column outside of a native form, any related computed columns will recalculate immediately.

---

<div class="post-metadata">

**Author:** ![MattJP](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattjp/32/47532_2.png) [@MattJP](https://community.glideapps.com/u/MattJP)\
**Post date:** [December 13, 2022, 1:59pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693/3 "2022-12-13T13:59:07Z")

</div>

> [@Darren\_Murphy](#):
>
> edit the column outside of a native form, any related computed columns will recalculate immediately

Thanks @Darren_Murphy , sorry for being a bit dim but I need to clarify.  
The ‘native’ forms are add, edit, details? (I am unclear about new.)  
How do I edit a column outside of a native form other than through a form screen or something else? Sorry if I misunderstand.

Let me pose a simple example of a quote record where the customer is entering a qty against a price and gets a total (qty x price) back. What is the design pattern for that?

Thanks again

---

<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:** [December 13, 2022, 2:13pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693/4 "2022-12-13T14:13:58Z")

</div>

> [@MattJP](#):
>
> The ‘native’ forms are add, edit, details? (I am unclear about new.)

An Add Form is what you get if you use a Show Form Screen Action, or enable the Add Form option on a list screen, or use a Form Button. You can tell when you’re in a native form, as you have the Cancel/Add options at the top of the screen.

![Screen Shot 2022-12-13 at 10.06.36 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/2/92b82a8b705e7057ae199a5d6ba3115b2683b57f.png)

And an Edit Screen is what you get if you enable the Edit option on a Details Screen, or use a Show Edit Screen Action. A native edit screen gives you Cancel/Done options.

![Screen Shot 2022-12-13 at 10.07.04 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/8/6837b3562ebfb636a7a15ca9e5b3fce92350f0ba.png)

These are the “out of the box” options that Glide provides for adding and editing data. The thing that both have in common is that any data that is edited/changed inside the form screen isn’t actually committed to the database until the form is submitted.

But there are other ways to add or edit data. You can stick input components on a details screen and allow users to directly change data. And of course there are the Set Column Values and Add Row actions.

When it comes to Custom Forms, @Jeff_Hager gave a very concise explanation here:

> [@Multi-step form](https://community.glideapps.com/t/multi-step-form/34556/4):
>
> A custom form is just a detail screen that’s designed to act like a form and uses entry components linked to user specific columns as the temporary placeholders for the data. Once you are done filling out the form, you can have a button with a custom action that will first have an Add Row action that will take those user specific column values and write them to a different table. You can then follow that action with a Set Column action that will clear the user specific columns so it’s ready fo…

> [@MattJP](#):
>
> Let me pose a simple example of a quote record where the customer is entering a qty against a price and gets a total (qty x price) back. What is the design pattern for that?

yeah, I’d probably use a Custom Form for that.

---

<div class="post-metadata">

**Author:** ![MattJP](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattjp/32/47532_2.png) [@MattJP](https://community.glideapps.com/u/MattJP)\
**Post date:** [December 13, 2022, 2:33pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693/5 "2022-12-13T14:33:22Z")

</div>

> [@Darren\_Murphy](#):
>
> Custom Form

Just one more Q. Can you clarify the term “custom form”?

@Jeff_Hager states it is

> [@Multi-step form](https://community.glideapps.com/t/multi-step-form/34556/4):
>
> just a detail screen

When I make changes to a Detail Screen it is made for every use of that screen (per Table) unless I am using “Independent screen configuration per item”, which has a very specific purpose that I don’t need. So I’m guessing that @Jeff_Hager is saying it is Detail Layout. Yes, I could customise Edit or Detail or Add but they would be changed in every use of those native forms.

I suppose that what I want to use is Show New Screen action or Show Form Screen action to create my custom form. I use New if I want to look at the same data that was on the screen with the action and I use Form if I want to start from scratch without any context.

I am trying to create a custom Delete button on an Edit screen. Delete action has many, reasonably complex options. I lost all my work when I changed the action screen type but when I start again I will use a Show New Screen action and then build from there. I will be careful never to change the action type.

Is that a reasonable understanding?

---

<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:** [December 13, 2022, 2:42pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693/6 "2022-12-13T14:42:02Z")

</div>

> [@MattJP](#):
>
> I suppose that what I want to use is Show New Screen action or Show Form Screen action

Show Form Screen will give you a native form, so you don’t want to use that.

The usual way to create a Custom Form is with a Show New Screen → This item action. (there are other ways, but that’s the most common).

> [@MattJP](#):
>
> I use New if I want to look at the same data that was on the screen with the action and I use Form if I want to start from scratch without any context.

uhh, nah…  
Show New Screen gives you a new details screen with a default set of components that you can customise. That screen will be tied to the action that calls it.  
If you use Show Form Screen, you’ll be able to customise your Form Screen, but the changes will apply to _everywhere_ else that you use a Form Screen for the same table.

I’d suggest making a copy of my [Custom Forms Concept App](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014) and study it. I think that should answer most of your questions.

---

<div class="post-metadata">

**Author:** ![MattJP](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattjp/32/47532_2.png) [@MattJP](https://community.glideapps.com/u/MattJP)\
**Post date:** [December 13, 2022, 2:48pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693/7 "2022-12-13T14:48:14Z")

</div>

Thanks again. As a matter of fact I did look extensively at your app (over the past 4 weeks I made three separate copies of it 😄 for different reasons) but maybe it was the one marked June 22 that I should have used. Anyway, thanks again and I’ll have another look. Jeff’s point that the main Glide Docs contain very little on this is apt.

I really thank you again for taking the time to explain things multiple times.

---

<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:** [December 13, 2022, 2:56pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693/8 "2022-12-13T14:56:58Z")

</div>

Yeah, I guess it takes a little while to wrap your head around it, but once the penny drops it becomes a very powerful tool to have in your Glide arsenal.

About the docs, it’s not really a “standard” Glide method, which is probably why you won’t find any official documentation on it. @kyleheney maybe there should be something? 🤔

Feel free to keep asking questions, and I’ll do my best to fill in any gaps.

---

<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:** [December 14, 2022, 2:57pm UTC](https://community.glideapps.com/t/when-does-glide-do-math-column-recalc/55693/9 "2022-12-14T14:57:36Z")

</div>

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