To create a formula in a catalog, follow the steps below:
Make use of the buttons on the toolbar above the editing panel to edit the formula. To comment a line, click the Comment/Uncomment button on the toolbar. If you want to bookmark a line so that it can be searched easily later, click the Add Bookmark button
. To check whether or not the syntax of your formula is correct, click the Check button
.
Notes:
"~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "+", "=", "{", "}", "[", "]", "|", "\\", ":", ";", "\", " ' ", "<", ",", ">", ".", "?", "/"
Examples:
Below are some formula examples:
|
|
|
Example 4: Running total of page
You can use the running total function to calculate the sum of one page. And to use the running total function, you have to create a set of formulas.
|
|
|
Example 5: Running total of group
This example will accumulate the total of the successful and failed shipments for each group.
|
|
|
Note: Global variables are not supported in dynamic formulas so an alternate way to do this is using two formulas (fShipped and fNotShipped) to return either 1 or 0 based on @Shipped:
if(@Shipped) return 1 else return 0;
if(@Shipped) return 0 else return 1;
Then add dynamic aggregations to sum on fShipped and fNotShipped. The result will be the same as using the global variables.