Difference between revisions of "Custom Field Type: Special – Calculated Value"

From SmartWiki
Jump to: navigation, search
(Arithmetic Operators)
Line 52: Line 52:
 
===Arithmetic Operators===
 
===Arithmetic Operators===
  
[[Image:Image:CS08.png]]
+
[[Image:CS08.png]]
  
 
===String Operators===
 
===String Operators===

Revision as of 22:07, 6 October 2008

General Description

Executes an expression to calculate a value and store the result. Additional information can be found in the SmartSimple wiki.

Field Options

  • Allow Empty: N/A
  • Default Text: N/A
  • Options: Expression
  • Track Changes: Yes
  • Store To Value: N/A

Special Options for Field

Expression – defines the expression to be executed.

All values are treated as strings. For arithmetic operations, PARSEINT and PARSEFLOAT functions are used to convert the string value to a numeric value.

Example summing the values using five custom fields:

ParseFloat([Total Monthly Cost]) + ParseFloat([Total Cost Ex]) + ParseFloat([Hardware Rental]) + ParseFloat([Email]) + ParseFloat([Other])

Field Validation

  • Type: N/A
  • JavaScript Validation: N/A
  • Message: N/A
  • HTML Tag: N/A

Field Formatting Options

  • Height: N/A Measure: Default:
  • Width: N/A Measure: Default:
  • Number Format: Yes
  • Style: Yes
  • Tool Tip: Yes

Notes

You can use arithmetic, string, comparison operators and functions within the calculated custom field.

  • References to other fields are always enclosed in square brackets: [variable1]
  • The calculations are performed when you click the Save button and save the page.

Important Notes on Calculation Order

  • Calculated field formulas are executed in the same order that the calculated fields are displayed on the page.
  • You must not place fields that perform summary calculations based on other calculated fields ABOVE the subordinate calculations.
  • If the fields are ordered in this manner, saving the page will not update the summary calculation, as summary formula will be executed BEFORE the subordinate calculations are performed.

SmartSimple Calculated Field Operators

Arithmetic Operators

CS08.png

String Operators

CS081.png

Comparison Operators

File:Image:CS084.png

Date Functions

File:Image:CS085.png

Other Functions

File:Image:CS086.png