Calculated fields and entering formulas

GS-Base uses formulas in the following procedures/functions:

To enter/edit a formula

Formulas available in GS-Base are similar to those used in spreadsheets with a few exceptions:

For example:

A few other examples:

=Unit_Price*Qty
="abc"
=1 + 2
="a" & 'b' & 3
=fv(0.75%, 36, -500, -5500, 0)
=LProg({2,2;1,2;4,0}, {1;1;1}, {14;8;16}, {2; 4},0,,)
=sum(field1, field2, field3, sum(field4, field5, field6))

Numbers and dates used as arguments cannot be formatted. For example, the following expressions are incorrect:

=$1,000.00 + 1
=dateDiff("6/3/11", "8/9/2011")

unless the description specifically states that parameters are arbitrary text strings to be converted to a specific type, like:

=value("$1,000.00") + 1
=dateDiff(dateValue("6/3/11"), dateValue("8/9/2011"))

Text strings should be delimited either by single or double quotation marks.

Formulas should not contain circular field references.

To browse all available formula categories and examples, please see the Field Setup dialog box or the Search dialog box.

Note: Square brackets [,] in parameter lists denote parameters that are optional and can be omitted. For example:

LProg(A, s, b, c, vector, [epsilon], [m])

However, you still have to use the corresponding parameter list separators, that is:

LProg(A, s, b, c, vector,,)

If your current Windows regional settings define commas as decimal separators, use semicolons (;) to separate function arguments or - if you prefer to use system independent (US) settings - select the generic locales via the Settings > Locales > Generic command.

Available operators:

OperatorOperationCommentsPrecedence
=EqualCompares numbers or text strings (the comparison is not case-sensitive).
Example: A1=4 , B2="abc"
6
<Less thanCompares numbers or text strings (the comparison is not case-sensitive).
Example: A1<4 , B2<"abc"
6
>Greater thanCompares numbers or text strings (the comparison is not case-sensitive).
Example: A1>4 , B2>"abc"
6
<=Less than or equalCompares numbers or text strings (the comparison is not case-sensitive).
Example: A1<=4 , B2<="abc"
6
>=Greater than or equalCompares numbers or text strings (the comparison is not case-sensitive).
Example: A1>=4 , B2>="abc"
6
<>Not equalCompares numbers or text strings (the comparison is not case-sensitive).
Example: A1<>4 , B2<>"abc"
6
+AdditionAdds numbers.5
-Subtraction5
&String concatenationMerges text strings.
Example: A1 & "abc" , "a" & "b"
5
*MultiplicationMultiplies numbers.4
/DivisionDivides numbers.4
^To the power ofCalculates the power of.3
-NegativeExample: -A12
%PercentSpecifies a number entered as a percentage.
Example: 12%
1