Variables

1. General variables

#cookies#

List of all cookies formatted in HTML format

#crlf#

Go to the new line “\r\n” resp. equivalent to pressing the “Enter” key.

#database#

Path to the currently used database. For the Firebird database, the variable contains the full path to the “fdb” file on disk; for the MSSQL database, the variable contains the name of the database.

#day#

The number of the current day of the month (1–31).

#dayofweek#

The number of the current day of the week (1–7).

#dayofyear#

Accrual day number of the year (1–365).

#defaultvalues#

Values scheduled by “SCHEDULEDEFAULTVALUE” and “SCHEDULEDEFAULTVALUES”, formatted as HTML.

#domlib#

DomLib analysis report.

#doublequotes#

Double quotes.

#form#

ID of the currently open edit form. The use of the variable is only possible in the edit form.

#formname#

The name of the currently open edit form, including the name of the application and the application group in which it is located. The full name is given in the format “Application group name / Application name / Form name”.

#facebook_access_token#

“Access_token” successful login to Facebook using the javascript function “loginByFacebook”.

#facebook_expires_on#

Expiration date and time of the “access token” of a successful login to Facebook using the javascript function “loginByFacebook”.

#google_access_token#

“Access_token” successfully logging in to Google using the javascript function “loginByGoogle”.

#google_refresh_token#

“Refresh_token” successful login to Google using the javascript function “loginByGoogle”.

#google_expires_on#

Expiration date and time of the “access token” of the successful login to Google using the javascript function “loginByGoogle”.

#guid#

New unique GUID.

#help#

Cross-application help – a summary of all help for application groups, applications, categories, view pages, edit forms, and RichText controls, labeled “Report Help.”

#id#

The ID of the currently open database record in the edit form.

#innerwidth#

The width of the view page or edit form specified in pixels in the web browser of the currently logged in user.

#innerheight#

The height of the view page or edit form specified in pixels in the web browser of the currently logged in user.

#ipaddress#

Client IP address. The “ipaddress2” variable must be used in the “Invalid login” form, because the “ipaddress” variable in this edit form indicates a control. If the connection to the server is mediated using IPv6, the content of the variable is an IPv6 address.

#ipaddress2#

The client's IP address used in the “Invalid login” edit form, where the “ipaddress” variable indicates an edit form control. If the connection to the server is mediated using IPv6, the content of the variable is an IPv6 address.

#language#

Abbreviation of the language of the currently logged in user: “cs”, “de”, “en”, “fr” or “sk”.

#lastcondition#

SQL condition of the last evaluated database query.

#lastjoin#

SQL join definition of the last evaluated database query.

#lastquery#

SQL statement of the last evaluated database query.

#lastqueryid#

ID of the last evaluated database query.

#lastvalue#

The value of the last database record created by the current user in that control. This value is evaluated from all records in the database that have the same PID record as the currently created record. The variable can only be used as the default value of the control.

#lastvalue2#

The value of the last database record created by the current user in that control. This value is evaluated from all records in the database, regardless of the PID column. The variable can only be used as the default value of the control.

#loginname#

Login name of the currently logged in user. The “loginname2” variable must be used in the “User” form, because the “loginname” variable in this edit form indicates a control.

#loginname2#

The login name of the currently logged in user in the “User” edit form, where the variable “loginname” indicates the control.

#logs#

List of all log files located in the “Logs” directory with the possibility of downloading them.

#microsoft_access_token#

“Access_token” of a successful login to Microsoft using the javascript function “loginByMicrosoft”.

#microsoft_refresh_token#

“Refresh_token” successful login to Microsoft using the javascript function “loginByMicrosoft”.

#microsoft_expires_on#

Expiration date and time of the “access token” of a successful login to Microsoft using the javascript function “loginByMicrosoft”.

#monday#

The date of the first day of the current week.

#month#

Current month number (1-12).

#nid#

The ID of the database record that was last created in the script by the “New record” command.

In the “OnAfterSave” script, the variable contains the ID of the last database record created in the “OnBeforeSave” script. In the “OnAfterDelete” script, the variable contains the ID of the last database record created in the “OnBeforeDelete” script. If it is necessary to know the value of the variable “nid” within one script, it is necessary to use the server function “COMMIT”, which immediately performs all entries in the database and does not wait for the successful completion of the entire script.

#noreply#

E-mail address “noreply@name_net_genia.cz”.

#now#

Current date and time in the format “dd.MM.yyyy HH:mm”.

#now2#

Current date and time in the format “dd.MM.yyyy HH:mm:ss”.

#null#

Database value “null”. The use of a variable only makes sense in a script, when it is necessary to write the database value “null” into the control in the edit form, or to write the same value anywhere in the database using a query.

#ocrserver#

OCR Server set up using the configuration file “Config\OCRServer.txt”.

#passwordhelp#

Password creation help based on the required password strength defined in the NET Genium settings.
If the password strength is set to “None”, the variable contains an empty string. The use of the variable is only possible in the help.

#passwordlength#

Required length of user passwords depending on the set password strength. 12 for strong, 8 for everyone else.

#pform#

The ID of the parent record edit form. The use of the variable is only possible in the edit form.

#span#

Parent record ID.

#planerfrom#

The start date of a planning calendar event when a new event was created or an existing one was moved (to another source or time).

#planners#

Schedule calendar event ID when a new event was created (returns “0”) or an existing one was moved (to another source or time). If table joins are used in the data source for the scheduler, this variable contains both the record ID from the source table and the record IDs of all accepted tables in the same order in which the join is set. These values are then separated by a semicolon.

#plannerresource#

The name of the scheduling calendar event source when the new event was created or an existing one was moved (to another source or time).

#plannerresourcefrom#

The name of the original scheduling calendar event source when the event was moved to another source.

#plannerresourceto#

The name of the new scheduling calendar event source when the event was moved to another source.

#plannerto#

The end date of the scheduling calendar event when a new event was created or an existing one was moved (to another source or time).

#png#

In web browsers that can display transparent “png” images, the variable contains the string “png”, in others it contains the string “gif”.

#portal#

Name NET Genium.

#rightsgroups#

A table of all permission groups, where the first column lists the permission group name, and the second column lists all user groups and users assigned to that permission group.

#rightsgroups2#

Matrix of all permission groups vs. all user groups that are assigned permissions to that group.

#root#

URL to the “root” directory of NET Genium without a slash at the end, for example ”https://www.netgenium.com/test”.

#rootpath#

Full path to the “root” directory of NET Genium, including a backslash at the end.

#sessionid#

A unique string identifying the currently logged in user.

#sngscript_stats#

Aggregated script execution statistics report based on data generated by simple or complete logging of NET Genium traffic.

#squerybuilder_stats#

Aggregated report of database query evaluation statistics based on data generated by simple or complete logging of NET Genium traffic.

#stables_stats#

Aggregated report of statistics of generation of edit forms based on data generated by simple or complete logging of NET Genium operation.

#sunday#

The date of the last day of the current week.

#sviewpages_stats#

Aggregated report of statistics of generating view pages based on data generated by simple or complete logging of NET Genium traffic.

#tab#

Tab “\t” resp. equivalent to pressing the “Tab” key.

#timetablefrom#

The start date of the Gantt chart event when the new event was created.

#timetableto#

The end date of the Gantt chart event when the new event was created.

#timetableresource#

The name of the Gantt chart event source when the new event was created.

#today#

Current date in the format “dd.MM.yyyy”. In places where a date is expected, the syntax “#today# + 1” (tomorrow), “#today# - 7” (seven days ago), “#today# + 1m” (per month), “#today# + 1y” (per year) etc. However, only one operator “+” or “ - ” can be used (it is not possible to write eg “#today#+ 2y + 7m + 3” or “#today#+ 2y7m3”).

#usergroup#, #usergroupname#

A semicolon-separated list of all user group names that the currently logged on user is a member of.

#usergroupid#

A semicolon-separated list of all user group IDs in which the currently logged on user is a member.

#userid#

The ID of the currently logged in user.

#useridentity#

The identity of the user authenticated by the operating system.

#username#

The full name of the currently logged in user.

#usergroups#

List of all user groups and users placed in these groups.

#usersonline#

List of currently logged in users.

#usersonline1#

Number of currently logged in users without an external license.

#usersonline2#

Number of currently logged in users with an external license.

#url#

The URL of the currently open website.

#viewpage#

The ID of the currently open view page.

#week#

The number of the current week of the year.

#wikihelp#

Contains help text for wiki formatting. The use of the variable is only possible in the help.

#wikihelp2#

Contains help text for wiki formatting, intended for eLearning application. The use of the variable is only possible in the help of the eLearning application.

#year#

Current year number.

2. Variables used in printing templates

2.1 List of variables

barcodeX, Y

An image of a barcode that is built based on an alphanumeric string stored in capital letters in a given control. The “X” parameter indicates the width of the image, the “Y” parameter the height of the image.

For example: “#ng_code@barcode320,240#”.

barcodeX, Y, Z

An image of a barcode that is built based on an alphanumeric string stored in capital letters in a given control. The “X” parameter indicates the width of the image, the “Y” parameter the height of the image. The “Z” parameter is optional and specifies the percentage size of the image in the case of print templates and MS Excel. For HTML print templates, the “Z” parameter specifies a value of “true” or “false”, which indicates whether a label with barcode text should also be generated in the barcode. If this parameter is not specified, the value “true” is automatically used.

For example: “#ng_code@barcode320,240,50#” (MS Excel) or “#ng_code@barcode320,240,false#” (HTML).

barcodeA,B,C,D

An image of a barcode that is built based on an alphanumeric string stored in capital letters in a given control. Parameter “A” indicates the width of the image, parameter “B” indicates the height of the image. Parameters “C” and “D” are optional. Parameter “C” specifies the percentage size of the image in the case of print templates and MS Excel. The “D” parameter specifies the value “true” or “false”, which indicates whether a label with the barcode text should also be generated in the barcode. If this parameter is not specified, the value “true” is automatically used.

For example: “#ng_code@barcode320,240,50,false#”.

#c0#, #c1#, c2#...

The column values of the lookup table that is the result of the aggregate database query. The variable “#c0#” indicates the first column, the variable “#c1#” the second, etc. When printing, NET Genium searches for a row with the occurrence of these variables and then copies it under itself as many times as there are in the record table. It then replaces the variables with the values from the look-up table.

#calendarX#

A placeholder for the calendar that will be copied to the print template when printing – the place in the print template where the calendar will be placed. An “X” indicates the order of the calendar on the view page or edit form. Numbering starts from one, the first calendar has the identifier “calendar1”, the second “calendar2”, etc.

#datagridX#

A placeholder for the lookup table that will be copied to the print template when printing – the place in the print template where the lookup table will be placed. An “X” indicates the order of the lookup table in the lookup page or edit form. Numbering starts from one, the first lookup table has the identifier “datagrid1”, the second “datagrid2”, etc.

#date1#

Start date of the filtered lookup table time period.

#date2#

End date of the filtered lookup table time period.

#f0#, #f1#, #f2#...

Values selected in lookup table, calendar or chart filters. The variable “#f0#” indicates the first filter, the variable “#f1#” the second, etc.

#filters#

List of values selected in view table, calendar or chart filters. If the print template is adapted to print multiple view tables at once, the full form of the identifier can be used.

For example: “#datagrid1#.#filters#”.

#chartX#

A placeholder for the chart image that will be copied to the print template when printed – the location in the print template where the chart image will be placed. An “X” indicates the order of the graph in the view page or edit form. The numbering starts from one, the first graph has the identifier “chart1”, the second “chart2”, etc.

#identifiers#

A list of database control identifiers that can be used in the print template. If the print template is adapted to print multiple view tables at once, the full form of the identifier can be used.

For example. “#datagrid1#.#identifiers#”.

image

An image that is stored in the form of its ID in a given variable or control.

For example: “#A@image#” or “#ng_image@image#”.

imageX

An image that is stored in the form of its ID in a given variable or control. The “X” parameter indicates the percentage size of the image.

For example: “#A@image50#” or “#ng_image@image50#”.

qrcodeXY

An image of a QR code that is compiled based on a string stored in a given control. The “XY” parameter indicates the image size in the range of 1 to 100.

For example: “#ng_code@qrcode3#”.

qrcodeXY,Z

An image of a QR code that is compiled based on a string stored in a given control. The “XY” parameter indicates the image size in the range of 1 to 100. The “Z” parameter is optional and specifies the percentage size of the image in the case of MS Excel print templates.

For example: “#ng_code@qrcode3,50#”.

2.2 Formatting control values

The format of the values inserted in the print template can be specified by adding an at sign after the appropriate control identifier. Pattern: “#ng_element@FORMAT#”, where the following variables can be substituted for FORMAT:

fixedheight

For the “xls” and “xlsx” print templates, it changes the way the row height is set for cells that have “Wrap text” checked in the format on the “Alignment” tab – it prevents automatic calculation and setting of the row height according to its content.

html

For “xls” and “xlsx” print templates, it changes the way text is inserted, and allows easy formatting using the “b”, “strong”, “i”, “em”, “u”, “sub” and “sup” tags.

number

It changes the decimal point of a number to a decimal point and removes the currency specification.

dph1

Reduced VAT rate valid on the given day.

dph2

Increased VAT rate valid on the given day.

dph1X

Reduced VAT rate valid on a given day in a specific country. The variable “X” must be replaced by the identifier of the control in which the country code is stored. Supported country codes: AT, BE, BG, CY, CZ, DE, DK, EE, EL, ES, FI, FR, GB, GR, HR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK, UK. Country codes cannot be written directly instead of the control identifier.

dph2X

Increased VAT rate valid on a given day in a specific country. The variable “X” must be replaced by the identifier of the control in which the country code is stored. Supported country codes: AT, BE, BG, CY, CZ, DE, DK, EE, EL, ES, FI, FR, GB, GR, HR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK, UK. Country codes cannot be written directly instead of the control identifier.

w

The number of the week calculated for the given day.

ww

The number of the week calculated on the given day, supplemented by the initial zero.

www

Contains the number of the week on the relevant date in the specified identifier in the format WW/YYYY.

For example: 01/2013

In all other cases where the control identifier is a date, formatting constants from the FORMATDATE server function can be used.