When does Glide do math column recalc?

The Math Column allows you to perform instant calculations on the data in your table.

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

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

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.

1 Like

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

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

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

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:

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

3 Likes

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

@Jeff_Hager states it is

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?

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).

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 and study it. I think that should answer most of your questions.

1 Like

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 :smile: 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.

1 Like

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? :thinking:

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

3 Likes

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