1 User variables:

User variables can be referenced with ${var}.

The list of allowed variables are:

  • ${USER} User name
  • ${LANG} User language
  • ${TODAY} Today's date
  • ${CURRENT} Today's timestamp

Other Variables

Moreover, the values of the ResultSet response of the SQL Query catalogued inside the tag name catalogGetUserSessionData from the appConfiguration.xml can also be used as ${ColumnName}

This variables can't be applied everywhere. Only in the following list of tags values ( /TagName/Text()) and attributes ( /TagName/@AttributeName) from appConfiguration.xml

  • /pdf/@ rowCondition
  • constraints/default/@ value
  • constraints/default/@ condition
  • constraints/notEditable/@ condition
  • editable/update/ condition/text()
  • editable/delete/ condition/text()
  • pdf/@ conditionSQL *

pdf/@conditionSQL

  • This condition must be written in SQL annotation.

  • When the user variable is a String it should be surrounded by '. Example '${USER}'. This must be done that way because of the SQL annotation

  • User variables ${TODAY} and ${CURRENT} are not allowed here

  • Object variables are also allowed in this conditions, written like $USER, this ones are not surrounded with '.

Also when the PDF displayed comes from a line of a List endPoint, it is possible to use as a variable the ${column} where "column" is the column used to link the pdf with the row, the /pdf/@column value

1.1 User variables in SQL Queries

In general the SQL queries allows the usage of the user variabled. But not all the variables are allowed. ${TODAY} and ${CURRENT} are not allowed, however XSQL-Script has his own methods to get the actual date and actual timestamp:

Copy
<today/>   <!-- actual date -->
<current/> <!-- actual timestamp -->

The SQL queries catalogued can also use the variable $0 in the "WHERE" clause and the application will add filters to the Query. The filters will be applied if the filtering data is sent in the transaction and if the columns accept to be filtered.

1.2 User variables in SQL transactions

The SQL transactions accept the usage of the user variables in the "validation Statements", ${TODAY} and ${CURRENT} are not accepted here

2 Row variables

Row variables are the ones that make reference to a value of a SQL query response. For each line of the ResultSet, the condition applied will use a different values. This values are used in List endPoints for the different links and buttons that may appear in the table

The row variables are written just with the ColumnName, the programme will search inside the selected row the column with the name and will make the replace.

This variables can be applied in the following places from appConfiguration.xml.

  • /pdf/@rowCondition
  • editable/update/condition/text()
  • editable/delete/condition/text()

Row variables in Links href

The attribute href from the links also accept the usage of rowVariables, but the notation this time is {ColumnName}