Jump to content
  • 0

Calculations


JckDY
 Share

Question

5 answers to this question

Recommended Posts

  • 0

Hi @JckDY,

The calculated field works better in some cases especially when it comes to reporting, however it will always depends on your work flow. Like for instance, the  advantage of the formula field is the value is being stored in the table, that said the formula field would be more effective when you need to save the calculated input from your DataPage to your Table,  because the calculated field/value can't be saved in the table. On the other hand, If you don't need to save the information in the table, you may want to use the Calculated field as it is more flexible and powerful with SQL and can also logically pass parameters.


You may visit the following articles for much detailed info.

https://howto.caspio.com/datapages/datapage-components/calculated-values/

https://howto.caspio.com/tables-and-views/data-types/formula-fields/

 

Cheers,

Z

 

Link to comment
Share on other sites

  • 0

Hi @JckDY,

 

Formula Fields and Calculated Fields are fundamentally the same. Their values are processed and can be dynamic based by the values of the other fields.

 

To give you further insight, I'll just give a few contrast points between the two.

* Everything that a formula field can do, a calculated field can.

* A formula field is defined on a table-level, whereas a calculated field is defined in a DataPage.

* A formula field may only reference to fields that are in the same table, while a calculated field may select/reference to fields from other tables (Most SQL queries)

* Last point, I think, is that formula fields may only have scalar values, meaning it does not have the ability to do SELECT statements, Subqueries, and get the current time, which a calculated field can.

 

So the deciding factor on which to use would be the scope of the field.

* If you want to be using a computed table field across multiple DataPages, Triggers, Views via a DataSource, formula field is the way to go.

* If you would be using a function that is not doable in a formula field, go for calculated fields instead.

 

Hope this helps.

 

Regards,

DN31337

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...