AgileApps Support Wiki Pre Release

Difference between revisions of "Formula Builder"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 1: Line 1:
The Formula Builder lets you interactively define a [[Formula Expressions|Formula Expression]].  
The Formula Builder lets you interactively define a [[Formula Expressions|Formula Expression]].  
__TOC__
__TOC__
===Example===
 
====Example====


::[[File:FormulaBuilder.png|border]]
::[[File:FormulaBuilder.png|border]]
Line 9: Line 10:
# The Operator "* Multiply" was chosen, inserting <tt>*</tt>
# The Operator "* Multiply" was chosen, inserting <tt>*</tt>
# The "Related to Customer" field "Discount" was chosen, inserting <tt>related_to_Customer.discount</tt>
# The "Related to Customer" field "Discount" was chosen, inserting <tt>related_to_Customer.discount</tt>
# The entire expression was enclosed in single quotes
# The '''[Check Syntax]''' button was clicked, to ensure validity.
# The '''[Check Syntax]''' button was clicked, to ensure validity.


{{Note|When comparing to strings, use double quotes:<br/> &nbsp; &nbsp; <tt><nowiki>related_to_Customer.name = "ABC Co."</nowiki></tt>}}
===Boolean Example===


===How it Works===
===How it Works===
#{{:ExpressionBuilder}}
#{{:ExpressionBuilder}}
===Considerations===
;Considerations:
:* To compare to a string, use single quotes: 'ABC Co.'
:* The return value of the expression must match the return value selected for the formula. (The '''[Check Syntax]''' button verifies that it does.)
:* To return a text string, the value returned should be a field of type Text (<tt>related_to_customer.name</tt>), or a literal string enclose in single quotes (<tt>'sample'</tt>
:* To return a Boolean, use an <tt>IF</tt> expression that returns true or false:
::<tt>IF(related_to_Customer.customer_name = 'ABC Co.', true, false)</tt>
::

Revision as of 19:35, 25 July 2011

The Formula Builder lets you interactively define a Formula Expression.

Example

FormulaBuilder.png

To build that formula:

  1. The "Order Amount" field was chosen, inserting order_amount
  2. The Operator "* Multiply" was chosen, inserting *
  3. The "Related to Customer" field "Discount" was chosen, inserting related_to_Customer.discount
  4. The [Check Syntax] button was clicked, to ensure validity.

Boolean Example

How it Works

  1. ExpressionBuilder

Considerations

Considerations
  • To compare to a string, use single quotes: 'ABC Co.'
  • The return value of the expression must match the return value selected for the formula. (The [Check Syntax] button verifies that it does.)
  • To return a text string, the value returned should be a field of type Text (related_to_customer.name), or a literal string enclose in single quotes ('sample'
  • To return a Boolean, use an IF expression that returns true or false:
IF(related_to_Customer.customer_name = 'ABC Co.', true, false)