Difference between revisions of "How Calculated Custom Fields Work"
From SmartWiki
Line 1: | Line 1: | ||
− | + | ==[[Custom Field Type: Special – Calculated Value|Special - Calculated Value]]== | |
− | * Expressions entered into this field type are evaluated as | + | * Expressions entered into this field type are evaluated as [[JavaScript]] functions. |
* These functions are added to associated page and executed in the client [[Browser|browser]]. | * These functions are added to associated page and executed in the client [[Browser|browser]]. | ||
* You can enter any valid JavaScript construct into these expressions. | * You can enter any valid JavaScript construct into these expressions. | ||
* The major limitation of this expression type is that it can only use values that are within the current page. | * The major limitation of this expression type is that it can only use values that are within the current page. | ||
− | * The expression cannot be used to manipulate values stored on other tabs or aggregate data from related [[Entity|entities]]. | + | * The expression cannot be used to manipulate values stored on other [[tabs]] or aggregate data from related [[Entity|entities]]. |
− | + | ==[[Custom Field Type: Special – Browser Script|Special - Browser Script]]== | |
− | * If you need to add a | + | * If you need to add a [[JavaScript]] to a page that does not manifest on the page then you can use the [[Custom Field Type: Special – Browser Script|Special - Browser Script]] field type. |
* Generally, this field type is used to specify validation routines. | * Generally, this field type is used to specify validation routines. | ||
* Functions defined in these scripts can be referenced in other calculated [[Custom Field|custom field]]. | * Functions defined in these scripts can be referenced in other calculated [[Custom Field|custom field]]. | ||
* You can control when the script is executed by using any valid '''JavaScript''' event triggers. You could force the script execution on '''page load''' (onLoad) or '''Save''' (OnSubmit). | * You can control when the script is executed by using any valid '''JavaScript''' event triggers. You could force the script execution on '''page load''' (onLoad) or '''Save''' (OnSubmit). | ||
− | + | ==[[Template / Type Formula||Template Level Formulas]]== | |
− | * Template level formulas can be associated with UTA | + | * Template level formulas can be associated with [[UTA]] {{l1}} and {{l2}} [[Template|templates]] plus [[Sales Tracking]]. |
− | * Template level formulas are not | + | * Template level formulas are not [[JavaScript]] functions and are not executed in the client [[Browser|browser]]. |
* These formulas are executed in the database server and are constructed using valid '''SQL''' syntax. | * These formulas are executed in the database server and are constructed using valid '''SQL''' syntax. | ||
* The benefit of this approach is that you can aggregate data across [[Entity|entities]] and update information across other [[Entity|entities]]. | * The benefit of this approach is that you can aggregate data across [[Entity|entities]] and update information across other [[Entity|entities]]. |
Revision as of 12:46, 24 June 2013
Contents
Special - Calculated Value
- Expressions entered into this field type are evaluated as JavaScript functions.
- These functions are added to associated page and executed in the client browser.
- You can enter any valid JavaScript construct into these expressions.
- The major limitation of this expression type is that it can only use values that are within the current page.
- The expression cannot be used to manipulate values stored on other tabs or aggregate data from related entities.
Special - Browser Script
- If you need to add a JavaScript to a page that does not manifest on the page then you can use the Special - Browser Script field type.
- Generally, this field type is used to specify validation routines.
- Functions defined in these scripts can be referenced in other calculated custom field.
- You can control when the script is executed by using any valid JavaScript event triggers. You could force the script execution on page load (onLoad) or Save (OnSubmit).
|Template Level Formulas
- Template level formulas can be associated with UTA Level 1 and Level 2 templates plus Sales Tracking.
- Template level formulas are not JavaScript functions and are not executed in the client browser.
- These formulas are executed in the database server and are constructed using valid SQL syntax.
- The benefit of this approach is that you can aggregate data across entities and update information across other entities.