FCS Express custom token formulas must follow standard rules for mathematical expressions in order to generate the desired token output. In addition to standard mathematical operations, FCS Express can also perform text manipulation, i.e., joining two text phrases together. The following table shows examples of correct and incorrect formulas for generating text results.

 

 

Desired Output

Correct Formula

Incorrect Formula

There are 5000 cells

"There are" + "5000 cells"

"There are" + 5000 cells

4

2+2

"2"+"2"

22

"2"+"2"

2+2

 

 

When tokens are inserted into formulas, they are considered to be one of two types:  numeric result tokens or text result tokens. Numeric tokens have a blue background and text tokens have a peach background when a formula is being edited. It is possible to change the result type of a token by right-clicking on the token and selecting the alternate result type from the drop-down menu (Figure 19.47).

 

 

Figure 19.47  Changing the Result Type in a Custom Token Formula

Figure 19.47  Changing the Result Type in a Custom Token Formula

 

When a new token is inserted into a formula, FCS Express will try to determine the correct result type. However, some tokens can make sense either as a number or text, depending on the context. It is up to you to ensure that the correct type is selected. The result type is important when FCS Express is trying to evaluate the result of a formula. Consider the case shown in the next table where there are 5000 cells on plot 2.

 

 

Desired Output

Correct Formula

Incorrect Formula

There are 5000 cells on plot 2

"There are " + Text Result + " cells on plot 2"

"There are " + Numeric Result + " cells on plot 2"

10000

Numeric Result * 2

Text Result * 2

 

 

 

In the first example, the incorrect formula tried to link a numeric result token (blue) to text phrases. The correct formula contains a text result token (peach).

 

In the second example, the incorrect formula tried to apply a mathematical operation to a text result token (peach). The correct formula contains a numeric result token (blue).

 

An incorrect formula will display ##ERROR## if the token is placed in a text box.