Expression builder

Expression builder interface

With expression builder you can specify parameters, arithmetic expressions and references to object properties for the selected cell. You can open expression builder for a table cell and for the Attach object dialog box. Press Shift + F2 to open the dialog box.


In the top part of the dialog box there is a field to enter any arithmetic expressions and use any constants and object properties. During input, in the list of functions and constants, all items containing input are displayed. If the input is incorrect, a message about the error or a tooltip will be displayed.

Click in the preview and the expression in the input field will be selected.

Press the button and the entered expression will be saved on the template formula bar.

Expressions from the formula template bar are marked with a star in the list of functions and constraints.

Formula templates

These allow expressions to be saved in templates for further use.
To save an expression, type it in the field and select the button. The expression’s button will be displayed in the templates list.
There is a tooltip when you move the cursor over the item.


To insert a template, select the button of the saved template. To delete a template, press the Alt button and drag the template button outside the Expression builder dialog box

If there are “$” symbols in the template, after insertion they are changed to the selected text. For example, we create the Iff(Exist($);$;””) template then type the text Object.Name, select it and insert the Iff template and the symbols are changed to the text – Iff(Exist(Object.Name;Object.Name;””).

Snap to objects

opens the Attach object dialog box.

Functions in the expression builder

Mathematical operations:

+ Addition
- Subtraction

Multiplication
/ Division

Raising to the power
sqrt() Square-root generation

Logical operations:

== equals
> more
< less
! nor
or
!= not equals
>= not less
<= not more
or
&& and

Functions:

Mathematical:

Cos, Sin, Tg Trigonometric function; argument is specified in degrees.
Acos, Asin, Atg Arc trigonometric functions, the result received in degrees.
Abs Modulus.
Int – Rounding of number.
Summ – Returns the sum of the variables values if the cells are grouped

For example:

Summ(Row) – returns the sum of the numbers of grouped rows.
Summ(Detal.L) – returns the sum of the parameter L values of the “Detail” object in grouped rows.

Data conversion:

Str Data conversion to string type.
Num Data conversion to numeric type.
Num Numerical value conversion to string type according to the parameters of the table column.

For example:
Frm(0.001230) returns 0.0012 string if zero suppression mode and 0,0000 accuracy are set for the column containing the cell.

Selection and comparing:

FmtText Addition of formatted strings.
FmtSub Creation of lower index.
FmtSuper Creation of upper index.
FmtDigit Number conversion to typesetting form.
FmtRaw Not formatted text.
FmtDiv Creation of fraction
If/Iff function of logical decision. Format: if(Logical_Condition; If_True; If_False,
where:
Logical_Condition – logical condition with logical operations for comparing;
If_True – returned value, if logical condition is held;
If_False – returning value, if logical condition is not held.

For example:
if(object == Marker; Marker.Position; “Not determined”). If the object type attached to the column cell has a Marker value, the function returns its Position value. If the object has another type, the Not determined value is returned.

Exist Checks the existence of a constant: =IF(EXIST;Object.Name;0)
Min/Max – Returns the minimum/maximum value listed in the brackets.

For example:
Min(maximum_value; minimum_value) – returns minimum_value; Max(maximum_value; minimum_value) – returns maximum_value.

Count – Returns the number of objects (for grouped rows of a table).

For example:
Count() – returns number of objects attached to the cells of the grouped rows.

Avg Calculates arithmetical average of arguments. It can use any number of arguments of any ranges. Null arguments are not used.
Off Returns a cell value, specified by a relative index. The index format is: Off(row; column)

For example:
Off(-1;2) – returns the cell value located one row above and two columns to the right of the current cell.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment