Form element

This table contains one row for each element in a form. The value in the Element type field determines which fields are filled out on each row.

PropertyValueDescription
DatabaseSystemThis table is in the system (vbsys) database.
SQL nameFormElThe table name in the database.
API identifierformElementThe API identifier used in GraphQL.
Table no.93The table number in the data model.

The following fields exist in this table:

AutoReport tag

VAT code tag name in AutoReport XML.

See also: Configuring VAT forms

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainString of length 60Text (60)
SQL nameArTagThe database field name.
API identifierautoreportTagThe API identifier used in GraphQL.
Number17703 

Background colour

The background colour of the form element.

Only relevant if you want to change the background colour of the text.

Is normally set using the colours dialog. The colours dialog can be found by pressing the * key on the keyboard or by double clicking in the field.

Press * or double-click to select colour.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainColourInteger
SQL nameBColThe database field name.
API identifierbackgroundColorThe API identifier used in GraphQL.
Number2232 

Copy variant

The copy variant used.

Only relevant if you want to have a different form element or shading on a copy e.g. buyers copy, sellers copy.

A look-up in this field gives you the following list of possible values:
1 - First copy
2 - Not first copy
3 - Last copy
4 - Not last copy
PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainCopy variantInteger
SQL nameVarThe database field name.
API identifiercopyVariantThe API identifier used in GraphQL.
Number2039 

Decimal type

The type of decimals.

Only relevant if you want to format the decimal type on the printout.

If the field is not filled in (has the value 0 in the database), the default decimals for the column in question are used.

A look-up in this field gives you the following list of possible values:
0 - Default
1 - Fixed
2 - Floating
PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainDecimal typeInteger
SQL nameDcmTpThe database field name.
API identifierdecimalTypeThe API identifier used in GraphQL.
Number6661 

Decimals

The number of fixed decimals.

Only relevant if you want to format the decimal field on the printout.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainNumber of digitsInteger
SQL nameDcmThe database field name.
API identifierdecimalsThe API identifier used in GraphQL.
Number6662 

dx

The width of the form element.

Must be specified to display the form element correctly on the paper printout.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainMarginInteger
SQL namedxThe database field name.
API identifierdxThe API identifier used in GraphQL.
Number2042 

dy

The height of the form element.

Must be specified to display the form element correctly on the paper printout.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainMarginInteger
SQL namedyThe database field name.
API identifierdyThe API identifier used in GraphQL.
Number2043 

Element processing

Processings rules for the form element.

A look-up opens the dialog box where you can see the following check boxes and options:
No digit grouping symbol
There will be no thousand separators on the printout. You must select this field for XML files because numbers with spaces are not accepted.
Get Company data if empty
Country and currency will be retrieved from the Company information table if it is missing from the order.
Remove spaces
All spaces will be deleted in the fields that you have entered in the Text/parameters field on the row. You can for example use bank account number and company number when you want to print these fields to an XML file.
Remove all except numbers
Everything except numbers will be deleted on the printouts.
Omit on original printout
The row will be excluded from the original printout. The row will then only be displayed when you print a copy of the order document from the Order document table. You can for example use the field to show that the printout is a copy by writing the text Copy on the row and selecting the option Omit on original printout.
Omit on printout from order document table
The row will be excluded when you print a copy of the order document from the Order document table. The row will only be shown on the original printout.
Do not truncate/round decimals on VAT report
The decimals in the VAT report will not be truncated.
Note:
This parameter must be used in countries where decimals shall be printed on VAT reports.
Do not break line with pipe character
When the option is checked, no line break will occur when a pipe character (a vertical bar, | ) appears in the field Text/parameters.
PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainElement processingInteger
SQL nameElProcThe database field name.
API identifierelementProcessingThe API identifier used in GraphQL.
Number6833 

Element type

The type of element.

Must be specified to display the form element correctly on the paper printout.

A look-up in this field gives you the following list of possible values:
0 - E-document
Rows in the Form element table with the value 0 - E-document in the Element type field will be processed in connection with E-documents and will not be included in the Order document formula table.
1 - Text

You can use relationship operators and logical operators in the Text/parameters field.

Relationship operators (same as in SQL):
  • Equal to: =
  • Greater than: >
  • Less than: <
  • Greater than or equal to: >=
  • Less than or equal to: <=
  • Different from: <>
Logical operators (same as in C++ and Java):
  • Negation (not): !
  • Conjunction (and): &&
  • Disjunction (or): ||
These expressions return 1 if true or 0 if false.
Evaluation order for parentheses and operators in the Text/parameters field:
  1. Brackets
  2. Multiplicative operators (+, -, *, / and %)
  3. Additive operators (* and /)
  4. Relational operators (=, >, <, >=, <= and <>)
  5. Negation (!)
  6. Conjunction (&&)
  7. Disjunction (||)
  8. Conditions and partial expressions (? and :), see point 1498
Operators at the same level are evaluated from left to right.
Conditional formulae for form elements:
  • In the Text/parameters field in the Form element table, formulas (which start with an equals sign) can contain conditions and sub-expressions which are evaluated if the condition is true or false.
  • The condition is followed by a question mark and the expressions are separated by a colon (in the same way as in C++ and Java).
= Condition ? Expression if the condition is true: Expression if the condition is false:
  • The conditions can have an almost unlimited number of levels, using parentheses.
  • The entire composite expression is entered in the relevant field.
Example of two levels:
  • = Condition 1 ? ( Condition 2 ? Expression which will be evaluated if conditions 1 and 2 are true. : Expression which will be evaluated if condition 1 is true but not 2. ) : Expression to be evaluated if condition 1 is false.
  • ? and : have the lowest priority of all operators and have been added at the end of the listings of evaluation order in points 1464 and 1478.

This is an alternative to using IF, ELSEIF, ELSE and ENDIF in the Element type field where a numerical value is to be returned.

2 - Line
Graphic line
3 - Rectangle
Graphic rectangle
4 - Rounded rectangle
Graphic rounded rectangle
5 - Oval
Graphic circle
6 - Bitmap
Is an image file
7 - IF

Conditional execution of form elements:

With IF and ELSEIF, the condition must be specified in the Text/parameters field on the row.

IF, ELSEIF and ELSE must be followed by one or more form elements which will be executed if the condition is true or false in the case of ELSE.

For each IF, there can be 0 or more ELSEIF's, 0 or 1 ELSE, and there must be 1 ENDIF.

Using ELSEIF merges ELSE and a following IF and eliminates the need for an extra ENDIF.

(If the program encounters an ELSEIF, ELSE or ENDIF without a preceding IF, the drawing of the form is stopped.)

When using conditional execution of form elements with element type IF and ELSE IF in the Form element table where the condition involves a varchar field and the comparison value is an empty string it is necessary to enclose the comparison value in double quotes (").

Example: @Order (Your ref.)<>""

The control structures can have an almost unlimited number of levels.

Example of two levels:

IF Condition 1 Form elements which will be executed if condition 1 is true.

IF Condition 2 Form elements which will be executed if condition 2 is true.

ELSEIF Condition 2B Form elements which will be executed if condition 2 is false, and 2B is true.

ELSE

Form elements which will be executed if the condition(s) is/are false.

ENDIF ELSEIF Condition 1B Form elements which will be executed if condition 1 is false, and 1B is true.

ELSE

Form elements which will be executed if the condition(s) is/are false.

ENDIF

If sentences can test whether a field is blank or whether data has been entered in the field. For example, you could have two address lines in the form on your order documents. If a customer has only used one of these, the blank line can be suppressed and not printed out.

Example: You select 7 - IF in the Element type field and type @Order(Address line 2)= in the Text/parameters field.

8 - ELSEIF
9 - ELSE
10 - ENDIF
11 - Company dependant picture 1

The selections 11 - Company dependant picture 1 and 12 - Company dependant picture 2 are used to show a picture which depends on the type of company that the printout has been prepared for.

The Text/parameters field is used to specify a variable name (without using the macro function) which refers to a row in the Text company variable table, where the same value is entered in the Variable name field. The picture file's path/file name is inserted in the Value 1 or Value 2 field for 11 - Company dependant picture 1 and 12 - Company dependant picture 2 respectively.

The Namespace field must also be filled out, with identical values in the Form element and Text company variable tables. Lookups in this column lead to the Namespace table.

Until further notice only BMP files will be used in forms.

By not specifying dx and dy for these form elements, the original width and height of the picture file will be used.

12 - Company dependant picture 2
13 - Image (Business NXT only)

The selection 13 - Image (Business NXT only) is used to print a company dependent image.

The image file is added from the Integer company variable table.

Additional setup needed for linking to the correct row in the Integer company variable table:
  • The Namespace field - the same value as the Namespace field in the Integer company variable table
  • The Text/parameters field - the same value as the Variable name field in the Integer company variable table

By not specifying dx and dy for these form elements, the original width and height of the picture file will be used.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainElement typeInteger
SQL nameElTpThe database field name.
API identifierelementTypeThe API identifier used in GraphQL.
Number2089 

Font

The text font.

The field shows the font family, style and size within square brackets. In the database there are three separate fields for font family, font style and font size. The field shown on the screen keeps the font size in the database.

The font size may be set as a percentage (e.g. 120) of the normal font size, cf. the Relative option in the Type drop-down list in the dialog box.

Is normally set with the Font command (in the Design group in the Home tab).

You can also specify the font size using the graphical editor. The graphical editor can be found using the processing Graphical editing from the Form table.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainFontInteger
SQL nameFSzThe database field name.
API identifierfontSizeThe API identifier used in GraphQL.
Number2047 

Foreground colour

The foreground colour of the form element.

Only relevant if you want to change the foreground colour of the text.

Press * or double-click to select colour.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainColourInteger
SQL nameFColThe database field name.
API identifierforegroundColorThe API identifier used in GraphQL.
Number2231 

Form no.

The form number.

Note:
If you double-click or press * in this field, you can look up a value in the related table.
PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainForm no.Integer
Primary keyYesForm type, Form no., Line no.
SQL nameFormNoThe database field name.
API identifierformNoThe API identifier used in GraphQL.
Number2037 
Table 1. Table relations
To tablePurposeFrom columnsTo columnsComments
FormForm
  • Form type
  • Form no.
This is a combined foreign key. Making a lookup in one of the fields may also fill in value in the others.

Form type

The form type.

Note:
If you double-click or press * in this field, you can look up a value in the related table.
PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainForm typeInteger
Primary keyYesForm type, Form no., Line no.
SQL nameFormTpThe database field name.
API identifierformTypeThe API identifier used in GraphQL.
Number2036 
Table 2. Table relations
To tablePurposeFrom columnsTo columnsComments
FormForm
  • Form type
  • Form no.
This is a combined foreign key. Making a lookup in one of the fields may also fill in value in the others.

Justification

How the form element is justified. In this field you enter the justification method for the form element.

Must be specified to display the form element correctly on the paper printout.

A look-up in this field gives you the following list of possible values:
1 - Left justified
2 - Centred
3 - Right justified
4 - Left justified header
5 - Centred header
6 - Right justified header
7 - Left justified footer
8 - Centred footer
9 - Right justified footer
PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainJustificationInteger
SQL nameJustThe database field name.
API identifierjustificationThe API identifier used in GraphQL.
Number2045 

Line no.

Each line in the table is given a consecutive number in the order in which they are entered.

Note:
The Line no. does not change when inserting new lines between existing ones. The Sort seq. no. specifies the order of the lines and is affected when new lines are inserted between existing lines.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainNo.Integer
Primary keyYesForm type, Form no., Line no.
SQL nameLnNoThe database field name.
API identifierlineNoThe API identifier used in GraphQL.
Number2038 

Line thickness

The line thickness shown in pixels.

Only relevant if you need lines in the paper printout e.g. when doing mathematical calculations.

The following values are possible in the graphical editor:
  • Invisible
  • Single
  • Double
  • Other

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainNo.Integer
SQL nameLnTnThe database field name.
API identifierlineThicknessThe API identifier used in GraphQL.
Number2230 

Namespace

Refers to the Namespace table.

The Namespace field is used to get the correct path to the picture file name.

The namespace value will be applied as a prefix to the local text found in the Text/parameters field.

Note:
No lookup will be performed across databases.

Note:
If you double-click or press * in this field, you can look up a value in the related table.
PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainGUIDText (40)
SQL nameNmSpThe database field name.
API identifiernamespaceThe API identifier used in GraphQL.
Number10785 
Table 3. Table relations
To tablePurposeFrom columnsTo columnsComments
NamespaceNamespace
  • Namespace

Page variant

The location of the form element on the printout.

Only relevant if form element is to be printed on a specified page.

A look-up in this field gives you the following list of possible values:
1 - First page
2 - Not first page
3 - Last page
4 - Not last page
5 - Giro element on last page
PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainPage variantInteger
SQL namePgVarThe database field name.
API identifierpageVariantThe API identifier used in GraphQL.
Number2246 

Sort seq. no.

The order of the lines.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainSort seq. no.Integer
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameSrtThe database field name.
API identifiersortSequenceNoThe API identifier used in GraphQL.
Number2090 

Style

A look-up opens the dialog box where you can see the following check boxes and options:
Bold
Italic
Underline
Strike through
PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainStyleInteger
SQL nameFStThe database field name.
API identifierfontStyleThe API identifier used in GraphQL.
Number2048 

Text/parameters

You can enter text or fields from the database that will be printed in the form element in the dialog box that appears when you double-click in the field.

Must be specified to display the form element correctly on the paper printout.

Reference can also be made to system-dependent variables using the macro functions:
  • @SystemInteger (Variable name, element no.)
  • @SystemDecimal (Variable name, element no.)
  • @SystemText (Variable name, element no.)
Reference can also be made to company-dependent variables with the macro functions:
  • @FirmInteger (Variable name, element no.)
  • @FirmDecimal (Variable name, element no.)
  • @FirmText (Variable name, element no.)

Element no. is in the 1 - 12 range for integer and decimal variables and the 1 - 2 range for text variables. The parameter can be omitted and will then be given the value 1. Remember to specify Namespace on the rows.

The @Date and @Time macro functions can take an arbitrary parameter, a date or a time respectively. When you enter a date and/or a time, it will be shown in the format that is selected in the Windows control panel on the computer concerned. They are stored internally as YYYYMMDD and HHMM respectively.
  • @Selection You can use the @Selection macro to print the current selection. The selection is shown in plain text and not as SQL code, and in the sequence defined in the selection dialog box. The macro @Selection will display the field, operator and value. If the selection criteria do not fit on a line, you can increase the dy value to break the line.
  • @Sort You can use the @Sort macro to print the current sorting. The sorting is shown in plain text and not as SQL code, and in the sequence defined in the sorting dialog box. The sorting is shown with numbering and AZ or ZA for ascending or descending sorting. The @Sort macro does not display subtotals.

In the macro function @GiroAmountAsText() you can enter the currency designation you require in brackets.

See Formula for more information about the macro functions.

Example

@GiroAmountAsText(Eur,Cent) - This text is displayed instead of the one that is hard-coded for the currency in question. This is implemented for the languages Norwegian, Swedish, Danish, German and Lithuanian. You select the language for the macro @GiroAmountAsText() in the Cheque amount text field in the Company information table.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainMacro functionsText (500)
SQL nameTxtThe database field name.
API identifiertextOrParametersThe API identifier used in GraphQL.
Number2044 

Type

The font name.

The following fonts are available:
  • Arial
  • Courier New
  • Lucida Console
  • Segoe UI
  • Times New Roman
Note:
You need to enter the exact font name in the Type field.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainTypeText (64)
SQL nameFFmThe database field name.
API identifierfontNameThe API identifier used in GraphQL.
Number2046 

x

The distance to the left-hand edge of the form.

Must be specified to display the form element correctly on the paper printout.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainMarginInteger
SQL namexThe database field name.
API identifierxThe API identifier used in GraphQL.
Number2040 

XML level

This field is no longer in use. Be aware the field may be removed in later versions.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainNo.Integer
SQL nameXMLlvlThe database field name.
API identifierxmlLevelThe API identifier used in GraphQL.
Number12028 

XML tag

Used for mapping the macro to the XML tag name. All names must be unique and defined in the same manner as the default layouts. At present, the field is only used for the Visma XML format and Altinn.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainString of length 60Text (60)
SQL nameXMLTagThe database field name.
API identifierxmlTagThe API identifier used in GraphQL.
Number12027 

y

The distance to the upper edge of the form.

Must be specified to display the form element correctly on the paper printout.

PropertyValueDescription
Visible by defaultYesThis field is visible by default in the table display.
DomainMarginInteger
SQL nameyThe database field name.
API identifieryThe API identifier used in GraphQL.
Number2041 

Control columns

Control columns include information about who has changed the record last and when, and which process that is currently editing the record.

Changed by provenance

The provenance for the record change.

A look-up in this field gives you the following list of possible values:

0 - None

1 - UI

10 - External API

20 - GAiA

21 - AI Connect

100 - Internal service

101 - Task automation

102 - AutoInvoice download

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainProvenanceInteger
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameChPvnThe database field name.
API identifierchangedByProvenanceThe API identifier used in GraphQL.
NumberA unique column number. 

Changed by user

The name of the user that changed the record.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainUser nameText (24)
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameChUsrThe database field name.
API identifierchangedByUserThe API identifier used in GraphQL.
NumberA unique column number. 

Changed date

The date when the record was changed.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainDateInteger
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameChDtThe database field name.
API identifierchangedDateThe API identifier used in GraphQL.
NumberA unique column number. 

Changed time

The time when the record was changed.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainTimeInteger
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameChTmThe database field name.
API identifierchangedTimeThe API identifier used in GraphQL.
NumberA unique column number. 

Changed time stamp

The date and time when the record was changed.

The field is updated with the UTC time.

This value can be used by external systems to replicate changed data. The column is indexed. 

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainDate/timeDateTime
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameChTsThe database field name.
API identifierchangedTimestampThe API identifier used in GraphQL.
NumberA unique column number. 

Created by provenance

The provenance for the record creation.

A look-up in this field gives you the following list of possible values:

0 - None

1 - UI

10 - External API

20 - GAiA

21 - AI Connect

100 - Internal service

101 - Task automation

102 - AutoInvoice download

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainProvenanceInteger
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameCrePvnThe database field name.
API identifiercreatedByProvenanceThe API identifier used in GraphQL.
NumberA unique column number. 

Created by user

The name of the user that created the record.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainUser nameText (24)
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameCreUsrThe database field name.
API identifiercreatedByUserThe API identifier used in GraphQL.
NumberA unique column number. 

Created date

The date when the record was created.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainDateInteger
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameCreDtThe database field name.
API identifiercreatedDateThe API identifier used in GraphQL.
NumberA unique column number. 

Created time

The time when the record was created.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainTimeInteger
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameCreTmThe database field name.
API identifiercreatedTimeThe API identifier used in GraphQL.
NumberA unique column number. 

Created time stamp

The date and time when the record was created.

The field is updated with the UTC time.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainDate/timeDateTime
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameCreTsThe database field name.
API identifiercreatedTimestampThe API identifier used in GraphQL.
NumberA unique column number. 

Edit status

The current status of the record.

A look-up in this field gives you the following list of possible values:

0 - Unchanged: The record is read, but not changed.

1 - Inserted: The record is new.

2 - Changed: The record is changed.

3 - Deleted: The record is deleted.

PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainEdit statusInteger
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameLckStThe database field name.
API identifiereditStatusThe API identifier used in GraphQL.
NumberA unique column number. 

Process no

The Process no. from the Active company process table which is currently using or has control of this record.

Note:
If you double-click or press * in this field, you can look up a value in the related table.
PropertyValueDescription
Visible by defaultNoThis field is not visible by default in the table display.
DomainProcess no.Integer
Write AccessNoneYou are not allowed to modify the value in this field.
SQL nameChPrcThe database field name.
API identifierlockedByProcessNoThe API identifier used in GraphQL.
NumberA unique column number. 
Table 4. Table relations
To table Purpose From columns To columns Comments
Active company process CompanyProcess Process no. Process no.