Functions
Functions are predefined formulas that perform calculations by using specific values, called arguments, in a particular order, or structure. In Time they're used to compose filter calculations for reports.
Currently, the Function feature in Time is designed to work only with fields, not the whole expression.
To open the Functions dialog:
-
Open the Equation Editor and highlight an expression. The Function button becomes enabled.
-
Click the Function button. The Functions dialog opens.
The Functions dialog is designed to add/remove functions around a field.
Example:
In the example below, "Clients" represents the table and "Name" represents the field. Together, [Clients].[Name] represents the field "Name" in the "Client" table.
-
[Clients].[Name]
For text fields, like names, client/employee numbers, addresses, etc., the LTRIM function is added automatically. Using the above example, the function would look as follows:
-
LTRIM([Clients].[Name])
If you wanted to add LEFT to the function, you would double-click LEFT in the function list. The function would look as follows:
-
LEFT(LTRIM([Clients].[Name]), )
You'll notice that there is a space to fill out before the last bracket. The space should be a number. For example:
-
LEFT(LTRIM([Clients].[Name]), 2)
Click OK to close the Functions dialog. You'll get an expression like this:
-
LEFT(LTRIM([Clients].[Name]), 2) is equal to 'ABC Limited'
Logically, this is still incorrect since the intention is to have all client names begin with two letters (e.g. 'AB'). To fix this, you need to enter 'AB' in the Equation Editor's 'Value' drop-down menu, instead of 'ABC Limited'.