Show/Hide Toolbars

Vouch implements a unique way to build expression asked at when configuring various objects. For example, when applying <Filter> you can choose to build filter expression. We will use Topbar > Accounts > Vouchers . Single > Filter > Create New Query > Create Manual Query to demonstrate how expression builder works. We will start with a simple use case and then will move to more complex scenarios.

 

 

#

Description

Image

1

Filter - 1: Pull all the records where amount is greater than 100.00.

2

Pressed F10 > Fields which popped up Select Field list.

 

Navigate to <Amount> and press <Enter>.

3

The field <Amount> has been deposited in the expression builder's input buffer in a human readable format. Do not make any changes to the selected field's format to prevent errors.

 

Note: Human readable format of a field consists of two parts:

1. The internal number representing the field, and

2. The name of the field.

Both joined by "^" (caret) character. This formatted name is only good until expression is built. Next time if you visit to edit this same expression, it might be possible that it could be different, if you had changed the names of the fields. So name part of the human readable notation is not important beyond you exit the expression builder.

4

Press <Space> then press F7 > Operators.

 

It is a good habbit to separate multiple parts of an expression with a space for the sake of readability. It also helps in debugging the expression if an error is raised.

 

A list of operators which can be applied in an expression will popup. The list is self-explanatory.

 

Select <Greater then> prompt.

5

We will have ">" inserted at the cursor position.

 

Type in "100.00".

 

We are done. The final expression will look like the one shown on the right.

6

Vouch encourage that you should always use parenthesis to delimit the logical chunks of an expression, especially which involve figures. So we club this expression into round parenthesis manually.

7

Done. Press <Enter>. You will see something like this. All records with "Amount" greater than "100.00" in a browser view.

8

Filter - 2: Pull all the records where amount is greater than 100.00 and date is less than 25Aug2016.

 

Continuing from Step#6:

 

F7 > Operators > And

Type: (

F10 > Fields > Date

F7 > Operators > Less than

Type: StoD( "20160825" )

Type: )

 

9

The result is like this, browser containing records where "Amount" is < 100.00 and "Date" < 25/08/2016.