Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
visionx:actions [2018/02/05 22:25]
admin [Is Desktop Environment]
visionx:actions [2022/09/15 19:48]
robot
Line 1: Line 1:
-~~Title: VisionX Actions~~ 
 ~~NOTRANS~~ ~~NOTRANS~~
 +
 +~~Title: VisionX Actions~~
 +Version: 1.0 / 2022-09-15
  
 ====== Introduction ====== ====== Introduction ======
  
-VisionX actions allow the user to change the applications performanceActions are used to implement functions in workscreenssuch as clicking ​a button ​named "​Report"​ to open a report, or calculating ​the value ''​%%QUANTITY * PRICE%%''​ in the "​SUM"​ column based on a value change ​in the "​QUANTITY"​ column.+This chapter is about adding functionality and features ​to a screen. 
 + 
 +For exampleopen document on button ​clickcalculate values after user input or log user changes, like when and who edited ​the record ​the last time. Of course, there are many more actions which we will look at in detail below. 
 + 
 +VisionX allows this very easily via events and actions. 
 + 
 +The chapter is divided into the following sections:
  
-There are numerous examples for the use of actions. The following chapters will explain the functionality ​of actions ​using common examples.+  * Basics 
 +  * Events 
 +  * Actions 
 +  * Formulas 
 +  * Parameter 
 +  * List of events 
 +  * List of actions 
 +  * List of conditions 
 +  * List of formulas
  
-We will begin with the basics.+Let's start with the basics.
  
 ====== Basics ====== ====== Basics ======
  
-Actions are created, edited ​and deleted via VisionX'​s GUI designer. They can be used for a number of events, such as, for example, the click of a button. When the selected event occurs during the use of a workscreen, the respective action is performed.+Events define when something happens ​and actions what happens.
  
-Example: When the event "button ​click" occurs, the specified ​action ​is executed. For examplethe action can show a a report.+In the previously mentioned examples events are click on a button ​('​create ​action')user input ('row value changed'​) or data change ('​after updating row').
  
-The following steps show how a report is displayed after the click of a button labeled "​Report"​.+The equivalent actions are open a document ('show file'​),​ calculate values ('​calculate value'​) and update modified values ('set value'​).
  
-====== Define Actions ======+===== Events ​=====
  
-The following steps demonstrate the definition of simple ​action.+Let's have closer lock on events. In order to add an action you must first think of the event which will trigger the action.
  
-Example: Displaying ​report by clicking a button labeled "​Report"​.+Screens, Tabsets, Editing Panels, Tables, Input Fields, Buttons and Hyperlinks have lot of different events. A List of all these events and their description is provided below (see [[#​list_of_events|List of events]]).
  
-  - Open a workscreen in the GUI Designer - e.g.: the "​Contacts"​ workscreen +==== Create / edit event ====
-  - Select the "​Report"​ button in the GUI Designer and click on the pencil icon+
  
-{{:​visionx:​actions:​add-action-1.png?​nolink|Step 2 - Create ​new action}}+If you open the customizer with right click on an element, a list of all possible events is displayed.
  
-<​HTML><​ol start="​3"​ style="​list-style-type:​ decimal;"></​HTML>​ +After selecting the desired event, ​the action ​wizard will be opened.
-<​HTML><​li></​HTML>​Click on the button "​Create/​Edit Action"​ to create/edit an action<​HTML></​li></​HTML><​HTML></​ol></​HTML>​+
  
-{{:​visionx:​actions:​add-action-2.png?​nolink|Step 3 - The Action Wizard}}+{{:​visionx:​actions:​actions1.png?​nolink|}}
  
-<​HTML><​ol start="​4"​ style="​list-style-type:​ decimal;"></​HTML>​ +For example, if you want to show an uploaded image on button click you have to open the customizer with a right click on the button (1).
-<​HTML><​li></​HTML>​Enter a description of the action ​on the "​Description"​ tab<​HTML></​li></​HTML>​ +
-<​HTML><​li></​HTML>​Click ​on the "​Action"​ tab and select "Show Report"<​HTML></​li></​HTML><​HTML></​ol></​HTML>​+
  
-{{:​visionx:​actions:​add-action-3.png?​nolink|Step 5 - Select ​the correct action.}}+At the bottom of the customizer a list of all possible events is displayed (2).
  
-<​HTML><​ol start="​6"​ style="​list-style-type:​ decimal;"></​HTML>​ +If you click on one of the events, the edit action wizard is opened.
-<​HTML><​li></​HTML>​Select ​the desired report as parameter<​HTML></​li></​HTML><​HTML></​ol></​HTML>​+
  
-{{:​visionx:​actions:​add-action-4.png?​nolink|Step 6 - The finished report action.}}+{{:​visionx:​actions:​actions2_1.png?​nolink|}}
  
-<​HTML><​ol start="​7"​ style="​list-style-type:​ decimal;"></​HTML>​ +===== Actions =====
-<​HTML><​li></​HTML>​Click the "​Verify"​ button and then "​OK"​ to verify and save<​HTML></​li></​HTML><​HTML></​ol></​HTML>​+
  
-This completes ​the action. It can be tested by closing the GUI Designer and changing to runtime mode. Clicking the "​Report"​ button opens the "​Contacts"​ report.+In the edit action ​wizard, you have 3 different tabs.
  
-Also, all selection lists can be searched for values using *. E.g."​*show"​ to search for all commands containing "​show"​.+{{:​visionx:​actions:actions2.png?​nolink|}}
  
-====== Documentation / Software Developer Specification ======+In the first tab **'​Description'​** (1) you can describe the functionality of the element.
  
-When an action is created, the first tab of the action wizard can be used to add a description. Our experience shows that unfortunately ​the documentation ​of applications is often neglected, ​or when it is created, not kept up to date. VisionX ​offers a great advantage through the universal use of a centralized description throughout the entire application. Consistent updating of the documentation requires little effort and should not be neglected. It particularly simplifies and shortens communication efforts when parts of the development tasks are transferred to suppliers.+This description will be added in the documentation ​(Help or Specification) which can be generated in VisionX.
  
-In VisionX, the description ​of the action on the first tab of the action wizard is used for the following:+The description ​will also be used as documentation directly in the generated source code.
  
-<​HTML><​ul></​HTML>​ +The second tab **'Action'​** ​(2offers ​the possibility ​to create or edit the actions.
-<​HTML><​li></​HTML><​HTML><​p></​HTML>​Description of the action in the specification document.<​HTML></​p></​HTML>​ +
-<​HTML><​p></​HTML>​This text serves as specification of the action for the software developer!<​HTML></​p></​HTML>​ +
-Specification documents make it easy to outsource certain functions to software providers / IT departments.<​HTML></​li></​HTML>​ +
-<​HTML><​li></​HTML>​Description of the action in the application's online help.<​HTML></​li></​HTML>​ +
-<​HTML><​li></​HTML><​HTML><​p></​HTML>​Description of the action in the function header ​(Javadocof the action-function in the Java source code.<​HTML></​p></​HTML>​ +
-<​HTML><​p></​HTML>​Changes ​to the description text (Javadoc) in the source code are automatically transferred verbatim to the VisionX action editor.<​HTML></​p></​HTML>​ +
-<​HTML><​p></​HTML>​This makes it easy to keep the documentation up to date!<​HTML></​p></​HTML><​HTML></​li></​HTML><​HTML></​ul></​HTML>​+
  
-====== Command Categories ======+When you are an advanced user, it is possible to edit the source code directly. This can be done in the tab **'​Source Code'​** (3). The changes must be validated too.
  
-There are different types of commands ​in VisionX:+For each action an example ​of the generated java code is provided, which can also be inserted or edited directly ​in the source code tab.
  
-<​HTML><​ul></​HTML>​ +==== Tab Action ====
-<​HTML><​li></​HTML><​HTML><​p></​HTML>​Commands<​HTML></​p></​HTML>​ +
-Commands execute predefined operations. They can include parameters that are considered when the action is performed.<​HTML></​li></​HTML>​ +
-<​HTML><​li></​HTML><​HTML><​p></​HTML>​Conditions<​HTML></​p></​HTML>​ +
-<​HTML><​p></​HTML>​Conditions allow for the execution of commands in dependence on whether the condition is met or not.<​HTML></​p></​HTML>​ +
-Example: If the currently registered user has the "​Administrator"​ role, all fields on the workscreen are visible. If the user does not have this role, only selected fields are shown.<​HTML></​li></​HTML>​ +
-<​HTML><​li></​HTML><​HTML><​p></​HTML>​Loops<​HTML></​p></​HTML>​ +
-<​HTML><​p></​HTML>​Loops are used to execute commands multiple times for the datasets of a table/​view.<​HTML></​p></​HTML>​ +
-<​HTML><​p></​HTML>​Example:​ Sending an email to all contacts.<​HTML></​p></​HTML><​HTML></​li></​HTML><​HTML></​ul></​HTML>​+
  
-====== Commands ======+In this tab you can configure the actions.
  
-Commands execute predefined operations, considering the specified parameters.+{{:​visionx:​actions:​actions3.png?​nolink|}}
  
-===== Formulas in commands =====+The action and the needed parameters are called **'​Command'​** (1).
  
-A number of commands can include ​the use of formulas. E.g. "​Calculate Value".+For example 'show file' with the parameters '​Filename'​ and '​Content'​ is a command.
  
-Formulas allow for the calculation ​of values using basic arithmetic operations, as well as a variety of group functions. For arithmetic operations ''​%%+%%'',''​%%-%%'',''​%%*%%'',​ ''​%%/​%%''​ and brackets ''​%%(%%''​ ''​%%)%%''​ can be used. E.g.: ''​%%12 *23 / + (1 - [Items.Quantity] * [Items.Price]- [Booking.Discount]%%''​.+A command is one of 3 possible statements ​(2).
  
-Group functions calculate results based on all values in a table column. A list is created using each row in the table column; the group function is then applied to this list. E.g. ''​%%avg([Items.Price])%%'' ​which returns the average of the prices in the table "​Items"​.+The statements are **'Command'**, **'Condition'** and **'​Repeat'​**.
  
-In addition, all functions are available in the variant to return ''​%%null%%''​ if all values in the column were ''​%%null%%''​. These variants have the same name but are postfixed with "​Null",​ E.g. ''​%%avgNull([Items.Price])%%''​. For additional information see [[http://​en.wikipedia.org/​wiki/​Null_(SQL)|the Wikipedia entry on SQL Null]].+Statements can be selected and combined as often as desired.
  
-==== avg / avgNull ====+The configured statements can be checked using '​Validate'​. (3) The wizard remains open and changes can still be made.
  
-Returns ​the average of all values.+With '​Finish'​ (4) the generated code is also checked, applied and the wizard is closed.
  
-<code> +'​Cancel'​ (4) discards all changes and closes the wizard. 
-avg([Items.Price]+ 
-avgNull([Items.Price])+==== Create Statements ==== 
 + 
 +It is possible to add more than one statements to an event. 
 + 
 +To add another statement it must be dragged from the statement block and dropped into the existing list of statements in the appropriate order. 
 + 
 +{{:​visionx:​actions:​actions5.png?​nolink|}} 
 + 
 +Therefore, you can select and drag the statement out from the right box (1) into the list of actions. 
 + 
 +The black line indicates where the statement will be placed (2). 
 + 
 +==== Sort Statements ==== 
 + 
 +It is also possible to change the order of the statements. 
 + 
 +{{:​visionx:​actions:​actions3_4.png?​nolink|}} 
 + 
 +To do this, move the mouse pointer to the left over the statement and start the move mode as already described for adding a new statement. 
 + 
 +==== Delete Statements ==== 
 + 
 +A statement can be deleted using the red cross to the right of the statement. 
 + 
 +{{:​visionx:​actions:​actions3_2_2.png?​nolink|}} 
 + 
 +It's also possible to delete all statements of an event. Therefore you must click the red cross next to the event. 
 + 
 +//​{{:​visionx:​actions:​actions8.png?​nolink|}}//​ 
 + 
 +==== Command ==== 
 + 
 +By default, an empty command is added in the wizard and you can select the appropriate action. 
 + 
 +{{:​visionx:​actions:​actions3_1.png?​nolink|}} 
 + 
 +Let's look at our example 'show file'​. 
 + 
 +{{:​visionx:​actions:​actions3_2.png?​nolink|}} 
 + 
 +The action 'show file' for example, opens the selected file stored in a data table. 
 + 
 +This action needs two parameters which you need to select from the corresponding table. The first one is the filename and the second the file itself. 
 + 
 +==== Condition ==== 
 + 
 +Now let's look at conditions. With conditions it's possible to perform an action only if a certain condition is met. 
 + 
 +{{:​visionx:​actions:​actions6.png?​nolink|}} 
 + 
 +Therefore, you must drag a condition out of the right statement box (1). 
 + 
 +Now you can define the condition when the action has to be performed. 
 + 
 +For example, if a file was uploaded (2) no action is performed, if a file was uploaded the file is displayed (3). 
 + 
 +==== Repeat ==== 
 + 
 +It's also possible to perform an action for each row in a table. 
 + 
 +{{:​visionx:​actions:​actions7.png?​nolink|}} 
 + 
 +Therefore, you must drag a repeat statement out of the statement box on the right side (1). 
 + 
 +Now you can decide for which table the action should be performed (2). 
 + 
 +In this example an email is sent to each contact stored in the table (3). 
 + 
 +==== Validate, Finish and Cancel ==== 
 + 
 +After an event has been configured, it still needs to be validated. 
 + 
 +{{:​visionx:​actions:​actions3_5.png?​nolink|}} 
 + 
 +The configured statements can be validated using '​Validate'​. (1) The wizard remains open and changes can still be made. 
 + 
 +With '​Finish'​ (2) the generated ​code is also validated, but applied and the wizard is closed. 
 + 
 +'​Cancel' ​(2) discards all changes and closes the wizard. 
 + 
 +==== Search for actions ==== 
 + 
 +There are two possible ways to search for actions. 
 + 
 +The first option is to open the drop down box in the action wizard and enter a search term. 
 + 
 +For example, if you search for '​value'​ only actions with the term '​value'​ are displayed. 
 + 
 +{{:​visionx:​actions:​actions9.png?​nolink|}} 
 + 
 +The second possibility is to open the search wizard (1with the button '​...'​ (2) next to the dropdwonbox. 
 + 
 +{{:​visionx:​actions:​actions10.png?​nolink|}} 
 + 
 +You can either search for a term (1) or filter all actions by category (2). It's also possible to combine both. 
 + 
 +{{:​visionx:​actions:​actions11.png?​nolink|}} 
 + 
 +If an action is selected all required parameters and a short description are displayed below. 
 + 
 +==== Create, Edit or Delete ==== 
 + 
 +In the customizer you can see if actions are configured and it's possible to delete or edit them. 
 + 
 +//​{{:​visionx:​actions:​actions4.png?​nolink|}}//​ 
 + 
 +Events with attached actions are now renamed to 'edit …' (1) on click the action wizard is opened and shows the actions. 
 + 
 +With the red cross next to the event you can delete all defined statements (2). 
 + 
 +Events with no action are still named '​create….'​ (3). 
 + 
 +===== Formulas ===== 
 + 
 +A number of actions can include the use of formulas. 
 + 
 +These actions can be recognized by the fact that the parameter input field is marked with "​Formula",​ which are: 
 + 
 +  * [[#​calculate_value|Calculate value]] 
 +  * [[#​set_label_with_calculated_currency|Set label with calculated currency]] 
 +  * [[#​set_label_with_calculated_date|Set label with calculated date]] 
 +  * [[#​set_label_with_calculated_date_short|Set label with calculated date short]] 
 +  * [[#​set_label_with_calculated_date_time|Set label with calculated date time]] 
 +  * [[#​set_label_with_calculated_date_time_short|Set label with calculated date time short]] 
 +  * [[#​set_label_with_calculated_time|Set label with calculated time]] 
 +  * [[#​set_label_with_calculated_value|Set label with calculated value]] 
 +  * [[#​set_parameter_with_calculated_value|Set Parameter with calculated value]] 
 + 
 +There are lots of arithmetic operations, group functions, date calculation and text operations available. 
 + 
 +A forumla is directly written in the formula field of an action. 
 + 
 +{{:​visionx:​actions:​formulas.png?​nolink|}} 
 + 
 +For a list of possible formulas see [[#​list_of_formulas|List of formulas]
 + 
 +===== Parameters ===== 
 + 
 +Parameters can be used to temporarily store values and reuse them within the screen or pass parameters to a screen. 
 + 
 +When the screen is closed, the parameter and the corresponding value are no longer available. 
 + 
 +There are the following actions to set or calculate parameters:​ 
 + 
 +  * [[#​set_parameter|Set Parameter]] 
 +  * [[#​set_parameter_with_calculated_value|Set Parameter with calculated value]] 
 +  * [[#​set_parameter_with_concatenated_text|Set Parameter with concatenated text]] 
 + 
 +====== List of events ====== 
 + 
 +===== Screen ===== 
 + 
 +==== On Load ==== 
 + 
 +This event is triggered if the screen is initialized. As long as the screen is not closed and reopened this event will not be executed again. 
 + 
 +In this event everything should be implemented that influences the screen directly. For example, hide elements due to roles, control access to tables (edit, update, delete), set filters... 
 + 
 +==== On Active ==== 
 + 
 +This event is triggered each time the screen gets active. 
 + 
 +For example, if you open the screen or activate the screen through an action from another screen or through a menu. 
 + 
 +For example, if ID parameters are passed to the screen, they will be used in this action. 
 + 
 +==== On Close ==== 
 + 
 +This event is triggered short before the screen is closed. 
 + 
 +With this event it is possible to prevent the closing throug an exception. 
 + 
 +===== Tabset / Editing Panel ===== 
 + 
 +==== Tab Activated ==== 
 + 
 +If a tab of a tabset is activated this event is triggered. 
 + 
 +===== Table / Input Fields ===== 
 + 
 +==== Row Value Changed ==== 
 + 
 +Every time a value of the selected table is changed, this event is triggered. The event is triggered when the input field is deselected. 
 + 
 +Hint: With this action you can create a log that saves any user changes. For more information see 
 + 
 +It is good practice to add changed_on, created_on table columns for all relevant tables. 
 + 
 +==== Before Row Selected ==== 
 + 
 +Is triggered before a row in a table is selected. 
 + 
 +==== After Row Selected ==== 
 + 
 +Is triggered after a row in a table was selected. 
 + 
 +==== Before Inserting Row ==== 
 + 
 +Is triggered before the data row is inserted in the memory. 
 + 
 +==== After Inserting Row ==== 
 + 
 +Is triggered after the data row is inserted in the memory. 
 + 
 +==== Before Inserted Row ==== 
 + 
 +Is triggered before the data row is inserted in the database. 
 + 
 +==== After Inserted Row ==== 
 + 
 +Is triggered after the data row is inserted in the database. 
 + 
 +==== Before updating Row ==== 
 + 
 +Is triggered before the data row is updated in the memory. 
 + 
 +==== After Updating Row ==== 
 + 
 +Is triggered after the data row is updated in the memory. 
 + 
 +==== Before Updated Row ==== 
 + 
 +Is triggered before the data row is updated in the database. 
 + 
 +==== After Updated Row ==== 
 + 
 +Is triggered after the data row is inserted in the database. 
 + 
 +==== Before Deleting Row ==== 
 + 
 +Is triggered before the data row is deleted from the memory. 
 + 
 +==== After Deleting Row ==== 
 + 
 +Is triggered after the data row is deleted from the memory. 
 + 
 +==== Before Deleted Row ==== 
 + 
 +Is triggered before the data row is deleted from the database. 
 + 
 +==== After Deleted Row ==== 
 + 
 +Is triggered after the data row is deleted from the database. 
 + 
 +==== Before Restore Row ==== 
 + 
 +If the action Restore selected record is executed, this event is triggered before restoring the row. 
 + 
 +The data is taken from the memory and no database query is performed. 
 + 
 +==== After Restore Row ==== 
 + 
 +If the action Restore selected record is executed, this event is triggered before restoring the row. 
 + 
 +The data is taken from the memory and no database query is performed. 
 + 
 +==== Before Reload Row ==== 
 + 
 +If any reload action is executed, this event is triggered before reloading the selected row. 
 + 
 +The data is fetched from the database. 
 + 
 +==== After Reload Row ==== 
 + 
 +If any reload action is executed, this event is triggered after reloading the selected row. 
 + 
 +The data is fetched from the database. 
 + 
 +===== Button / Hyperlink ===== 
 + 
 +==== Create Action ==== 
 + 
 +This event is triggered every time the button / hyperlink is clicked. 
 + 
 +===== Validator ===== 
 + 
 +==== Create Validation ==== 
 + 
 +This event is triggered every time the validator is used. 
 + 
 +====== List of actions ====== 
 + 
 +===== Application ===== 
 + 
 +==== Logout ==== 
 + 
 +The current user is logged out. 
 + 
 +<code java> 
 +((ProjX)getApplication()).doLogout(null);
 </​code>​ </​code>​
-==== min / minNull ​====+==== Reload all screens ​====
  
-Returns the smallest value.+Discards all unsaved changes and reloads all screens.
  
-<​code>​ +<​code ​java
-min([Items.Price]) +((ProjX)getApplication()).doReload();
-minNull([Items.Price])+
 </​code>​ </​code>​
-==== max / maxNull ​====+==== Show error message ​====
  
-Returns the largest value.+Shows a message in an error dialogue.
  
-<​code>​ +^Parameter ​   ^Description ​                                                                       ^Example ​                             ^ 
-max([Items.Price]) +|**Message** ​ |Error message with reference to all databook columns and parameters of the screen ​ |**[Contacts.Lastnameis missing!** ​ | 
-maxNull([Items.Price])+ 
 +<code java> 
 +showError(this,Text.val(new Var(rdbContacts,"​LASTNAME"​)) + " is missing!"​);
 </​code>​ </​code>​
-==== count / countNull ​====+==== Show information message ​====
  
-Returns the number of entries.+Shows a message in an information dialogue.
  
-<​code>​ +^Parameter ​   ^Description ​                                                                             ^Example ​                             ^ 
-count([Items.Price]) +|**Message** ​ |Information message with reference to all databook columns and parameters of the screen ​ |**[Contacts.Lastnameis missing!** ​ | 
-countNull([Items.Price])+ 
 +<code java> 
 +showInformation(this,Text.val(new Var(rdbContacts,"​LASTNAME"​)) + " is missing!"​);
 </​code>​ </​code>​
-==== sum / sumNull ​====+==== Silent abort ====
  
-Returns the sum of all values.+Cancels current execution without showing a message.
  
-<​code>​ +<​code ​java
-sum([Items.Price]) +throw new SilentAbortException();
-sumNull([Items.Price])+
 </​code>​ </​code>​
-==== sumToCurrent / sumToCurrentNull ​====+===== Data management =====
  
-Returns the sum of values from the first row to the selected row.+==== Ask before delete ====
  
-<​code>​ +Shows an 'are you sure...'​ question before deleting a record within the selected table. 
-sumToCurrent([Items.Price]) + 
-sumToCurrentNull([Items.Price])+^Parameter ​ ^Description ​ ^Example ​               ^ 
 +|**Table** ​ |Table name   ​|**[Table:​ Contacts]** ​ | 
 + 
 +<​code ​java
 +ProjXUtil.addAskDeleteDialog(rdbContacts);
 </​code>​ </​code>​
-==== first / firstNull ​====+==== Assign column name ====
  
-Returns ​the first value.+Assigns ​the column name where data should be stored.
  
-<​code>​ +^Parameter ​   ^Description ​            ​^Example ​                       ^ 
-first([Items.Price]) +|**Element** ​ |the element ​            |**[Editor: Contacts.Street]**  | 
-firstNull([Items.Price])+|**Name** ​    |the name of the column ​ |**[Street]**                   | 
 + 
 +<code java> 
 +editContactsStreet.setColumnName("​STREET"​);
 </​code>​ </​code>​
-==== last / lastNull ​====+==== Assign table ====
  
-Returns ​the last value.+Assigns ​the table which should be used for displaying data. If a table has been dragged into a screen, it can be replaced by another table.
  
-<​code>​ +^Parameter ​   ^Description ​                             ^Example ​                   ^ 
-first([Items.Price]) +|**Element** ​ |the table view which should be replaced ​ |**[TableView: Contacts]**  | 
-firstNull([Items.Price])+|**Name** ​    |the new assigned table                   |**[Table: Professions]**   | 
 + 
 +<code java> 
 +tableContacts.setDataBook(rdbProfessions);
 </​code>​ </​code>​
-===== List of all commands =====+==== Assign table for editor ​====
  
-The following table shows all commands, descriptions,​ parameters, examples, and the resulting Java Code: Command Description including Parameters and Example Java-Code+Assigns ​the table which should be used for displaying data of an editor .
  
-==== Workscreen commands ====+Hint: For example, a search field can be assigned to another table that will be searched.
  
-=== Open screen ===+^Parameter ​  ​^Description ​               ^Example ​                   ^ 
 +|**Editor** ​ |editor, search, validator ​ |**[Search: Customers.*]** ​ | 
 +|**Table** ​  |the table                  |**[Table: Contacts]** ​     |
  
-Opens the specified workscreen.+<code java> 
 +filterCustomers.setDataRow(rdbContacts);​ 
 +</​code>​ 
 +==== Calculate value ====
  
-Parameters: ''​%%[List of all Workscreens]%%''​+Calculates a value based on dynamic or fixed data and sets the result into a column (see [[#​list_of_formulas|List of Formulas]]. The value can be calculated with any values from other tables, with parameters or specific texts.
  
-Example: Open Workscreen ​User Management+^Parameter ​    ​^Description ​                          ^Example ​                                  ^ 
 +|**Write to**  |the column where the value is stored ​ |**[Products.total]** ​                     | 
 +|**Formula** ​  |the calculation ​                      ​|**[Products.price]*[Products.quantity]**  ​|
  
-<​code>​ +<​code ​java
-getApplication().openWorkScreen("contacts.client.workscreens.ContactsWorkscreen")+Calc.set(new Var(rdbProducts,"​TOTAL"​),Calc.val(new Var(rdbProducts,​"PRICE"​)) * Calc.val(new Var(rdbProducts,​"QUANTITY"​)));
 </​code>​ </​code>​
-=== Close screen ​===+==== Create unique identifier ====
  
-Closes ​the specified workscreen.+Creates a unique identifier and sets the value into a selected column.
  
-Parameters: ''​%%[List of all Workscreens]%%''​+^Parameter ​    ​^Description ​                          ​^Example ​                    ^ 
 +|**Write to**  |the column where the value is stored ​ |**[Products.product key]**  |
  
-Example: Close Workscreen | User Management+<code java> 
 +DataBookUtil.createUniqueIdentifier(new Var(rdbProducts,"​PRODUCT_KEY"​));​ 
 +</​code>​ 
 +==== Delete all records ====
  
-<​code>​ +Deletes all records in the selected table. 
-((ProjX)getApplication()).close("​contacts.client.workscreens.ContactsWorkscreen"​)+ 
 +^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]** ​ | 
 + 
 +<​code ​java
 +rdbProducts.deleteAllRows();
 </​code>​ </​code>​
-=== Center screen ​===+==== Delete record ====
  
-Centers ​the current ​workscreen (horizontally and vertically).+Deletes ​the selected/current ​record in the selected table.
  
-Example: ​Center Workscreen+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:Products]** ​ |
  
-<​code>​ +<​code ​java
-center()+rdbProducts.deleteAllRows();
 </​code>​ </​code>​
-=== Close this screen ​===+==== Deselect ====
  
-Closes ​the current workscreen.+In the selected table no row is selected, when a row is selected, it is deselected.
  
-Example: ​Close Workscreen+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:Products]** ​ |
  
-<​code>​ +<​code ​java
-close()+rdbProducts.setSelectedRow(-1);
 </​code>​ </​code>​
-==== DataBook commands ​====+==== Disable Delete cascade ​====
  
-=== Fetch All ===+Disables automatic deletion of sub records in the selected table.
  
-Fetches all rows of the specified databook.+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]** ​ |
  
-Parameters: ''​%%[List of all databooks ​in a workscreen]%%''​+<code java> 
 +rdbProducts.setDeleteCascade(false);​ 
 +</​code>​ 
 +==== Disable Delete ​in table ====
  
-Example: Fetch all rows | [Databook: Contacts]+Disables deletion of records in the selected table.
  
-HintThis command is used to ensure that all rows of a databook/​view are loaded and displayed (e.g. to search for specific entries)+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:Products]** ​ |
  
-<​code>​ +<​code ​java
-rdbContacts.fetchAll()+rdbProducts.setDeleteEnabled(false);
 </​code>​ </​code>​
-=== Deselect ​===+==== Disable Edit in table ====
  
-No row in the specified databook is selected.+Disables editing of records ​in the selected ​table.
  
-Parameters: ''​%%[List of all databooks in a workscreen]%%''​+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]**  |
  
-Example: Deselect Row | [Databook: Contacts]+<code java> 
 +rdbProducts.setUpdateEnabled(false);​ 
 +</​code>​ 
 +==== Disable Insert in table ====
  
-<​code>​ +Disables creating of records in the selected table. 
-rdbContacts.setSelectedRow(-1)+ 
 +^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]** ​ | 
 + 
 +<​code ​java
 +rdbProducts.setInsertEnabled(false);
 </​code>​ </​code>​
-=== Select first row ===+==== Disable data manipulation in table ====
  
-The first row of the specified databook is selected.+Disables all manipulation (insert, edit, delete) ​of records in the selected ​table.
  
-Parameters: ''​%%[List of all databooks in a workscreen]%%''​+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]**  |
  
-Example: Select First Row | [Databook: Contacts]+<code java> 
 +rdbProducts.setReadOnly(true);​ 
 +</​code>​ 
 +==== Disable fetching data ====
  
-<​code>​ +Disables fetching data from server (no database query is performed). 
-rdbContacts.setSelectedRow(0)+ 
 +^Parameter ​ ^Description ​ ^Example ​               ^ 
 +|**Table** ​ |the table    |**[Table: Contacts]** ​ | 
 + 
 +<​code ​java
 +rdbContacts.setFetchEnabled(false);
 </​code>​ </​code>​
-=== Select last row ===+==== Disable record lock ====
  
-The last row of the specified databook is selected.+Disables record lock an reload ​of current record before start editing.
  
-Parameters: ''​%%[List of all databooks in a workscreen]%%''​+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]**  |
  
-Example: Select last row | [Databook: Contacts]+<code java> 
 +rdbProducts.setLockAndRefetchEnabled(false);​ 
 +</​code>​ 
 +==== Disable search in memory ====
  
-<​code>​ +Disables search in memory, the data is fetched form the server (a database query is performed). 
-rdbContacts.setSelectedRow(rdbContacts.getRowCount() - 1)+ 
 +^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]** ​ | 
 + 
 +<​code ​java
 +rdbProducts.setMemFilter(false);
 </​code>​ </​code>​
-=== Select last inserted row ===+==== Disable sort in memory ====
  
-Selects the last inserted row in the specified databook.+Disables sort in memory, the data is fetched form the server (a database query is performed).
  
-Parameters: ''​%%[List of all databooks in a workscreen]%%''​+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]**  |
  
-Example: Select last inserted row | [Databook: Contacts]+<code java> 
 +rdbProducts.setMemSort(false);​ 
 +</​code>​ 
 +==== Disable store on server ====
  
-Hint: This command can be used to transfer data from the last inserted row in a databook to another databook, or to use the data in a report. After the execution of this command the values of the row's various columns can be accessed (e.g. using the "Set Value with Text" command).+Disables sending changed records ​to the database.
  
-<​code>​ +^Parameter ​ ^Description ​ ^Example ​              ^ 
-DataBookUtil.selectLastInsertedRow(rdbContacts)+|**Table** ​ |the table    |**[Table:​Products]** ​ | 
 + 
 +<​code ​java
 +rdbProducts.setWritebackEnabled(false);
 </​code>​ </​code>​
-=== Select row having value ===+==== Duplicate selected record ====
  
-Searches ​the specified databook for a row and selects that row. The selected table column is used to check if the value in the column is equal to the specified value. The search is applied to all rows of the table; the first row containing an exact match is selected.+Duplicates ​the selected ​record.
  
-Parameters''​%%[List of all columns of all databooks in a workscreen],​ [Value for which all rows are searched]%%''​+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:Products]**  |
  
-ExampleSelect row having value | [Contacts.Lastname] | Maria+<code java> 
 +DataBookUtil.copySelectedRow(rdbProducts);​ 
 +</​code>​ 
 +HintThe old record remains selected.
  
-<​code>​ +==== Enable Delete cascade ==== 
-DataBookUtil.selectRowHavingValue(rdbContacts,"​Maria"​)+ 
 +Enables automatic deletion of sub records in the selected table. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]** ​ | 
 + 
 +<​code ​java
 +rdbProducts.setDeleteCascade(true);
 </​code>​ </​code>​
-=== Store selection ​===+==== Enable Delete in table ====
  
-Stores ​the currently ​selected ​row in the specified databook, to enable selection of that row at a later time.+Enables deletion of records in the selected ​table.
  
-Parameters: ''​%%[List of all databooks in a workscreen]%%''​+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]**  |
  
-Example: Store current selection | [Databook: Contacts]+<code java> 
 +rdbProducts.setDeleteEnabled(true);​ 
 +</​code>​ 
 +==== Enable Edit in table ====
  
-Hint: This command can be used to restore the original selection after a number ​of operations.+Enables editing ​of records in the selected table.
  
-<​code>​ +^Parameter ​ ^Description ​ ^Example ​              ^ 
-DataBookUtil.storeSelection(rdbContacts)+|**Table** ​ |the table    |**[Table:​Products]** ​ | 
 + 
 +<​code ​java
 +rdbProducts.setUpdateEnabled(true);
 </​code>​ </​code>​
-=== Restore selection ​===+==== Enable Insert in table ====
  
-The previously saved selection ​in the specified databook is restored. If no selection is stored, no change is made.+Enables creating of records ​in the selected table.
  
-Parameters: ''​%%[List of all databooks in a workscreen]%%''​+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]**  |
  
-Example: Restores selection | [Databook: Contacts]+<code java> 
 +rdbProducts.setInsertEnabled(true);​ 
 +</​code>​ 
 +==== Enable data manipulation in table ====
  
-Hint: This command can be used to restore the original selection after a number ​of operations.+Enables all manipulation (insert, edit, delete) ​of records in the selected table.
  
-<​code>​ +^Parameter ​ ^Description ​ ^Example ​              ^ 
-DataBookUtil.restoreSelection(rdbContacts)+|**Table** ​ |the table    |**[Table:​Products]** ​ | 
 + 
 +<​code ​java
 +rdbProducts.setReadOnly(false);
 </​code>​ </​code>​
-=== Insert row before ​===+==== Enable fetching data ====
  
-Inserts a new row in the specified databook before the currently selected row.+Enables fetching data from server (database query is performed).
  
-Parameters: ''​%%[List of all databooks in a workscreen]%%''​+^Parameter ​ ^Description ​ ^Example ​               ^ 
 +|**Table** ​ |the table    |**[Table: Contacts]**  |
  
-Example: Insert row before | [Databook: Contacts]+<code java> 
 +rdbContacts.setFetchEnabled(true);​ 
 +</​code>​ 
 +==== Enable record lock ====
  
-<​code>​ +Enables record lock an reload of current record before start editing. 
-rdbContacts.insert(true)+ 
 +^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]** ​ | 
 + 
 +<​code ​java
 +rdbProducts.setLockAndRefetchEnabled(true);
 </​code>​ </​code>​
-=== Insert row after ===+==== Enable search in memory ====
  
-Inserts a new row in the specified databook after the currently selected row.+Enables search ​in memory, ​the data is not fetched form the server (no database query is performed).
  
-Parameters: ''​%%[List of all databooks in a workscreen]%%''​+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]**  |
  
-Example: Insert row after | [Databook: Contacts]+<code java> 
 +rdbProducts.setMemFilter(true);​ 
 +</​code>​ 
 +==== Enable sort in memory ====
  
-<​code>​ +Enables sort in memory, the data is not fetched from the server (a database query is performed). 
-rdbContacts.insert(false)+ 
 +^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]** ​ | 
 + 
 +<​code ​java
 +rdbProducts.setMemSort(false);
 </​code>​ </​code>​
-=== Ask before delete ​===+==== Enable store on server ====
  
-Asks the user to confirm before a row is deleted in the specified databook.+Enables sending changed records ​to the database.
  
-Parameters: ''​%%[List of all databooks in a workscreen]%%''​+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Products]**  |
  
-Example: Ask before delete | [Databook: Contacts]+<code java> 
 +rdbProducts.setWritebackEnabled(true);​ 
 +</​code>​ 
 +==== Fetch all ====
  
-<​code>​ +Loads all available records of the selected table. 
-ProjXUtil.addAskDeleteDialog(rdbContacts)+ 
 +^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Contacts]** ​ | 
 + 
 +<​code ​java
 +rdbContacts.fetchAll();
 </​code>​ </​code>​
-=== Calculate Value ===+Hint: This command is used to ensure that all rows of a table/view are loaded and displayed (e.g., to search for specific entries)
  
-Calculates the result of the specified formula (see [[#​formulas_in_commands|Formulas in commands]]) and written in the specified table column.+==== Insert record after ====
  
-Parameters: ''​%%[List of all columns of all databooks in workscreen],​ [Formula including reference to columns ​in all tables of the workscreen]%%''​+Inserts ​new record ​in the selected table after the currently selected record.
  
-Example: Calculate value [Contacts.Total] ​[Contacts.Quantity] ​* [Contacts.Price]+^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    ​|**[Table:Contacts]**  |
  
-Hint: This command can be used for various mathematical operations. The result is then written to a table column. E.g.: calculation of the total price based on quantity and unit price. See [[#​formulas_in_commands|Formulas in commands]] for additional details regarding the use of formulas in commands.+<code java> 
 +rdbContacts.insert(false);​ 
 +</​code>​ 
 +==== Insert record before ====
  
-<​code>​ +Inserts a new record in the selected table before the currently selected record. 
-Calc.set(new Var(rdbContacts,"​TOTAL"​),​ + 
-    Calc.val(new Var(rdbContacts,"​QUANTITY"​)) * +^Parameter ​ ^Description ​ ^Example ​              ^ 
-    Calc.val(new Var(rdbContacts,"​PRICE"​)))+|**Table** ​ |the table    |**[Table:​Contacts]** ​ | 
 + 
 +<​code ​java
 +  rdbContacts.insert(true);
 </​code>​ </​code>​
-=== Set Value with Text ===+==== Insert sub record ====
  
-Inserts ​the specified text in the specified databook column.+If the data element tree is added to the screen it is possible to create a sub record at the current position ​in the tree.
  
-Parameters: ''​%%[TargetList of all columns of all databooks in a workscreen],​ [Text including reference to columns in all tables of the workscreen]%%''​+^Parameter ​ ^Description ​  ​^Example ​                                    ^ 
 +|**Tree** ​  |tree element ​ |**[TreeCustomers|Orders|Order Details]**  |
  
-Example: Set value with text| [Contacts.Name] | [Contacts.Filename],​ [Contacts.Lastname]+<code java> 
 +  tree1.doInsertSub();​ 
 +</​code>​ 
 +==== Make value unique ====
  
 +Makes a value unique.
 +
 +It is checked whether this value already exists in the table column. If yes, then the value is extended by a numbering. For example, if the value '​XXX'​ is entered but already exists, the value is changed to 'XXX - 2'.
 +
 +^Parameter ​  ​^Description ​ ^Example ​                    ^
 +|**Column** ​ |the value    |**[Products.product key]** ​ |
 +
 +<code java>
 +DataBookUtil.makeValueUnique(new Var(rdbProducts,"​PRODUCT_KEY"​));​
 +</​code>​
 +==== Reload table ====
 +
 +Discards all unsaved changes and reloads all records of the selected table.
 +
 +^Parameter ​ ^Description ​ ^Example ​              ^
 +|**Table** ​ |the table    |**[Table:​Contacts]** ​ |
 +
 +<code java>
 +rdbContacts.reload();​
 +</​code>​
 +Hint: This action can be used to query changes from other users or made in other screens and update the opened screen.
 +
 +==== Restore selected record ====
 +
 +This action can be used to restore the original selection in a table after a number of operations. The selected row must be stored before.
 +
 +Hint: This action works only within the same action as 'Store selected record'​.
 +
 +For example: - store selected record - loop through all records of the table - restore selected record
 +
 +^Parameter ​ ^Description ​ ^Example ​              ^
 +|**Table** ​ |the table    |**[Table:​Contacts]** ​ |
 +
 +<code java>
 +DataBookUtil.restoreSelection(rdbContacts);​
 +</​code>​
 +==== Save table ====
 +
 +Saves all changes in the selected Table.
 +
 +^Parameter ​ ^Description ​ ^Example ​              ^
 +|**Table** ​ |the table    |**[Table:​Contacts]** ​ |
 +
 +<code java>
 +rdbContacts.saveAllRows();​
 +</​code>​
 +Hint: This action can be used to save changes using a "​Save"​ button.
 +
 +==== Search by key ====
 +
 +The filter works like [[*search-by-value|Search by value]], but in case of a drop down in search mode "​equals",​ you don't search by the displayed value (e.g. "​Mr."​) but by the id (e.g. 1).
 +
 +This can improve the performance in some cases.
 +
 +^Parameter ​   ^Description ​        ​^Example ​                  ^
 +|**Element** ​ |the search element ​ |**[Search: Contacts.*]** ​ |
 +|**Value** ​   |the value           ​|**[Table:​Contacts]** ​     |
 +
 +<code java>
 +filterContacts.setValue("​Mr."​);​
 +</​code>​
 +==== Search by value ====
 +
 +Sets the value of a search element.
 +
 +It's possible to set a value or use column values, element values, parameters or combine all of them.
 +
 +^Parameter ​   ^Description ​        ​^Example ​                                      ^
 +|**Element** ​ |the search element ​ |**[Search: Contacts.*]** ​                     |
 +|**Value** ​   |the value           ​|**[Contacts.Firstname] [Contacts.Lastname]** ​ |
 +
 +<code java>
 +filterContacts.setDisplayValue(Text.val(new Var(rdbContacts,"​FIRSTNAME"​)) + " " + Text.val(new Var(rdbContacts,"​LASTNAME"​)));​
 +</​code>​
 +==== Select first record ====
 +
 +Selects the first record of the selected table.
 +
 +^Parameter ​ ^Description ​ ^Example ​                ^
 +|**Table** ​ |the table    |**[Table: Customers]** ​ |
 +
 +<code java>
 +DataBookUtil.selectFirstRow(rdbCustomers);​
 +</​code>​
 +==== Select last inserted record ====
 +
 +Selects the last inserted record in the selected table.
 +
 +^Parameter ​ ^Description ​ ^Example ​                ^
 +|**Table** ​ |the table    |**[Table: Customers]** ​ |
 +
 +<code java>
 +DataBookUtil.selectLastInsertedRow(rdbCustomers);​
 +</​code>​
 +==== Select last record ====
 +
 +Selects the last record of the selected table.
 +
 +^Parameter ​ ^Description ​ ^Example ​                ^
 +|**Table** ​ |the table    |**[Table: Customers]** ​ |
 +
 +<code java>
 +DataBookUtil.selectLastRow(rdbCustomers,​false);​
 +</​code>​
 +==== Select next record ====
 +
 +Selects the next record of the selected table. The cycle option enables you to jump from the last to the first record.
 +
 +^Parameter ​ ^Description ​             ^Example ​                ^
 +|**Table** ​ |the table                |**[Table: Customers]** ​ |
 +|**Cycle** ​ |jump from last to first  |**Yes** ​                |
 +
 +<code java>
 +DataBookUtil.selectNextRow(rdbCustomers,​true);​
 +</​code>​
 +==== Select previous record ====
 +
 +Selects the previous record of the selected table. The cycle option enables you to jump from the first to the last record.
 +
 +^Parameter ​ ^Description ​             ^Example ​                ^
 +|**Table** ​ |the table                |**[Table: Customers]** ​ |
 +|**Cycle** ​ |jump from first to last  |**Yes** ​                |
 +
 +<code java>
 +DataBookUtil.selectPreviousRow(rdbCustomers,​true,​false);​
 +</​code>​
 +==== Select record having value ====
 +
 +Selects the first record that contains the specific value.
 +
 +^Parameter ​  ​^Description ​      ​^Example ​                      ^
 +|**Column** ​ |the table         ​|**[Customers.company name]** ​ |
 +|**Value** ​  |the search value  |**XYZ** ​                      |
 +
 +<code java>
 +DataBookUtil.selectRowHavingValue(new Var(rdbCustomers,"​COMPANY_NAME"​),"​XYZ"​);​
 +</​code>​
 +==== Set ascending sort ====
 +
 +Sorts the selected table ascending by the given column.
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  ​|tables ​      ​|**[Table:​ Contacts]** ​ |
 +|**Column** ​ |columns ​     |**[Lastname]** ​        |
 +
 +<code java>
 +rdbContacts.setSort(new SortDefinition(true,"​LASTNAME"​));​
 +</​code>​
 +==== Set column default value ====
 +
 +If a new table row with filled default values is added.
 +
 +^Parameter ​  ​^Description ​                                                       ^Example ​               ^
 +|**Table** ​  |the table                                                          |**[Table: Contacts]** ​ |
 +|**Column** ​ |the column ​                                                        ​|**[Salutation]** ​      |
 +|**Value** ​  ​|text,​ column value, filter value, parameter, concatenation of all  |**Mrs.** ​              |
 +
 +<code java>
 +rdbContacts.getRowDefinition().getColumnDefinition("​SALU_SALUTATION"​).setDefaultValue("​Mrs."​);​
 +</​code>​
 +==== Set column editable ====
 +
 +The selected column of the table is set editable.
 +
 +Hint: This action sets both the column in the table as well as the associated editor editable!
 +
 +If the column should not be editable you have to use the action 'Set column readonly'​.
 +
 +^Parameter ​  ​^Description ​ ^Example ​                  ^
 +|**Column** ​ |Column ​      ​|**[Contacts.Firstname]** ​ |
 +
 +<code java>
 +DataBookUtil.setColumnEditable(new Var(rdbContacts,"​FIRSTNAME"​));​
 +</​code>​
 +==== Set column label ====
 +
 +Changes the header label of a table column.
 +
 +^Parameter ​  ​^Description ​                                                       ^Example ​               ^
 +|**Table** ​  |the table                                                          |**[Table: Contacts]** ​ |
 +|**Column** ​ |the column ​                                                        ​|**[Salutation]** ​      |
 +|**Label** ​  ​|text,​ column value, filter value, parameter, concatenation of all  |**Salutation** ​        |
 +
 +<code java>
 +rdbContacts.getRowDefinition().getColumnDefinition("​SALU_SALUTATION"​).setLabel("​Salutation"​);​
 +</​code>​
 +==== Set column mandatory ====
 +
 +Sets a column of a table mandatory.
 +
 +Hint: This action sets both the column in the table as well as the associated editor mandatory!
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  |the table    |**[Table: Contacts]** ​ |
 +|**Column** ​ |the column ​  ​|**[Salutation]** ​      |
 +
 +<code java>
 +rdbContacts.getRowDefinition().getColumnDefinition("​SALU_SALUTATION"​).setNullable(false);​
 +</​code>​
 +==== Set column not mandatory ====
 +
 +Sets a column of a table not mandatory.
 +
 +Hint: This action sets both the column in the table as well as the associated editor not mandatory!
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  |the table    |**[Table: Contacts]** ​ |
 +|**Column** ​ |the column ​  ​|**[Lastname]** ​        |
 +
 +<code java>
 +rdbContacts.getRowDefinition().getColumnDefinition("​LASTNAME"​).setNullable(true);​
 +</​code>​
 +==== Set column not searchabel ====
 +
 +A selected column is excluded from the search.
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  |the table    |**[Table: Contacts]** ​ |
 +|**Column** ​ |the column ​  ​|**[Lastname]** ​        |
 +
 +<code java>
 +rdbContacts.getRowDefinition().getColumnDefinition("​LASTNAME"​).setFilterable(false);​
 +</​code>​
 +==== Set column not sortable ====
 +
 +It is no longer possible to sort the selected column in the header.
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  |the table    |**[Table: Contacts]** ​ |
 +|**Column** ​ |the column ​  ​|**[Lastname]** ​        |
 +
 +<code java>
 +rdbContacts.getRowDefinition().getColumnDefinition("​LASTNAME"​).setSortable(false);​
 +</​code>​
 +==== Set column readonly ====
 +
 +Sets a selected column readonly.
 +
 +Hint: This action sets both the column in the table as well as the associated editor readonly!
 +
 +^Parameter ​  ​^Description ​ ^Example ​              ^
 +|**Column** ​ |the column ​  ​|**[Contacts.Email]** ​ |
 +
 +<code java>
 +DataBookUtil.setColumnReadOnly(new Var(rdbContacts,"​EMAIL"​));​
 +</​code>​
 +==== Set column searchable ====
 +
 +A selected column is included in the search.
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  |the table    |**[Table: Contacts]** ​ |
 +|**Column** ​ |the column ​  ​|**[Lastname]** ​        |
 +
 +<code java>
 +rdbContacts.getRowDefinition().getColumnDefinition("​LASTNAME"​).setFilterable(true);​
 +</​code>​
 +==== Set column sortable ====
 +
 +The selected column can be sorted in the header.
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  |the table    |**[Table: Contacts]** ​ |
 +|**Column** ​ |the column ​  ​|**[Lastname]** ​        |
 +
 +<code java>
 +rdbContacts.getRowDefinition().getColumnDefinition("​LASTNAME"​).setSortable(true);​
 +</​code>​
 +==== Set column width ====
 +
 +Changes the width of a selected table column.
 +
 +Hint: This action works only in the onLoad event of the screen.
 +
 +^Parameter ​  ​^Description ​                                         ^Example ​               ^
 +|**Table** ​  |the table                                            |**[Table: Contacts]** ​ |
 +|**Column** ​ |the column ​                                          ​|**[Lastname]** ​        |
 +|**Width** ​  ​|text,​ column value, parameter, concatenation of all  |**200** ​               |
 +
 +<code java>
 +rdbContacts.getRowDefinition().getColumnDefinition("​LASTNAME"​).setWidth(200);​
 +</​code>​
 +==== Set current date ====
 +
 +The current time and date are written to the selected table column.
 +
 +Hint: This action can be used to pre-fill all date columns with the current date. With this action it's also possible to create a log that shows when a record was added or changed. It is good practice to add changed_on, created_on table columns for all relevant tables!
 +
 +^Parameter ​    ​^Description ​     ^Example ​                 ^
 +|**Write to**  |the date column ​ |**[Contacts.Birthday]** ​ |
 +
 +<code java>
 +Text.set(new Var(rdbContacts,"​BIRTHDAY"​),​new Date());
 +</​code>​
 +==== Set current user ====
 +
 +Sets the current username into a selected column
 +
 +^Parameter ​    ​^Description ​     ^Example ​                 ^
 +|**Write to**  |the date column ​ |**[Contacts.Username]** ​ |
 +
 +<code java>
 +Text.set(new Var(rdbContacts,"​BIRTHDAY"​),​new Date());
 +</​code>​
 +Hint: When you start VisionX you are logged in as VisionX user. With this user no user is set. To change the user there is a button "​Switch User" at the bottom right. Here you can choose if you want to use the VisionX user or one of the actual application users managed in the user management. It's also possible to Logout and Login (Button in the top navigation) as application user.
 +
 +With this action it's also possible to create a log that shows who added or changed a record. It is good practice to add changed_by, created_by table columns for all relevant tables!
 +
 +==== Set descending sort ====
 +
 +Sorts the selected table descending by the given column.
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  ​|tables ​      ​|**[Table:​ Contacts]** ​ |
 +|**Column** ​ |columns ​     |**[Lastname]** ​        |
 +
 +<code java>
 +rdbContacts.setSort(new SortDefinition(false,"​LASTNAME"​));​
 +</​code>​
 +==== Set label with calculated currency ====
 +
 +Calculates a value based on dynamic or fixed data, rounds the result to 2 decimal places and set it as label.
 +
 +The value can be calculated with any values from other tables, with parameters or specific texts (see [[#​list_of_formulas|List of Formulas]]).
 +
 +^Parameter ​   ^Description ​                                    ​^Example ​                                                                          ^
 +|**Label** ​   |the label element (Button, Label, Group Panel) ​ |**[Label: Total]** ​                                                               |
 +|**Formula** ​ |the formula for calculation ​                    ​|**[Order Details.Unit Price]*[Order Details.Quantity]*[Order Details.Dsicount]** ​ |
 +
 +<code java>
 +Calc.setText(labelTotalPrice,​Calc.val(new Var(rdbOrderdetails,"​UNIT_PRICE"​)) * Calc.val(new Var(rdbOrderdetails,"​QUANTITY"​)) * Calc.val(new Var(rdbOrderdetails,"​DSICOUNT"​)),"#,##​0.00"​);​
 +</​code>​
 +==== Set label with calculated date ====
 +
 +Calculates a date value and set it as label.
 +
 +The value can be calculated with any date values from other tables or with parameters (see [[#​date_group_functions|Date group functions]]).
 +
 +^Parameter ​   ^Description ​                                    ​^Example ​                             ^
 +|**Label** ​   |the label element (Button, Label, Group Panel) ​ |**[Label: Date]** ​                   |
 +|**Formula** ​ |the formula for calculation ​                    ​|**addYears([Contacts.Birthday],​1)** ​ |
 +
 +Example: January 1, 2001
 +
 +<code java>
 +  Calc.setDateText(labelLabel,​Calc.addYears(Calc.val(new Var(rdbContacts,"​BIRTHDAY"​)),​1));​
 +</​code>​
 +==== Set label with calculated date short ====
 +
 +Calculates a date value, formats it as date short and set it as a label.
 +
 +The value can be calculated with any date values from other tables or with parameters (see [[#​date_group_functions|Date group functions]]).
 +
 +^Parameter ​   ^Description ​                                    ​^Example ​                             ^
 +|**Label** ​   |the label element (Button, Label, Group Panel) ​ |**[Label: Date]** ​                   |
 +|**Formula** ​ |the formula for calculation ​                    ​|**addYears([Contacts.Birthday],​1)** ​ |
 +
 +Example: 1/1/2001
 +
 +<code java>
 +  Calc.setDateShortText(labelLabel1,​Calc.addYears(Calc.val(new Var(rdbContacts,"​BIRTHDAY"​)),​1));​
 +</​code>​
 +==== Set label with calculated date time ====
 +
 +Calculates a date value, formats it as date and time and set it as a label.
 +
 +The value can be calculated with any date values from other tables or with parameters (see [[#​date_group_functions|Date group functions]]).
 +
 +^Parameter ​   ^Description ​                                    ​^Example ​                             ^
 +|**Label** ​   |the label element (Button, Label, Group Panel) ​ |**[Label: Date]** ​                   |
 +|**Formula** ​ |the formula for calculation ​                    ​|**addHours([Contacts.Birthday],​5)** ​ |
 +
 +Example: Januara 1, 2000, 6:00 AM
 +
 +<code java>
 +  Calc.setDateTimeText(labelLabel,​Calc.addHours(Calc.val(new Var(rdbContacts,"​BIRTHDAY"​)),​5));​
 +</​code>​
 +==== Set label with calculated date time short ====
 +
 +Calculates a date value, formats it as date time short and set it as a label.
 +
 +The value can be calculated with any date values from other tables or with parameters (see [[#​date_group_functions|Date group functions]]).
 +
 +^Parameter ​   ^Description ​                                    ​^Example ​                             ^
 +|**Label** ​   |the label element (Button, Label, Group Panel) ​ |**[Label: Date]** ​                   |
 +|**Formula** ​ |the formula for calculation ​                    ​|**addHours([Contacts.Birthday],​5)** ​ |
 +
 +Example: 1/1/2000, 6:00 AM
 +
 +<code java>
 +  Calc.setDateTimeShortText(labelLabel1,​Calc.addYears(Calc.val(new Var(rdbContacts,"​BIRTHDAY"​)),​1));​
 +</​code>​
 +==== Set label with calculated time ====
 +
 +Calculates a date value, formats it as date and time short and set it as a label.
 +
 +The value can be calculated with any date values from other tables or with parameters (see [[#​date_group_functions|Date group functions]]).
 +
 +^Parameter ​   ^Description ​                                    ​^Example ​                             ^
 +|**Label** ​   |the label element (Button, Label, Group Panel) ​ |**[Label: Date]** ​                   |
 +|**Formula** ​ |the formula for calculation ​                    ​|**addHours([Contacts.Birthday],​5)** ​ |
 +
 +Example: 6:00 AM
 +
 +<code java>
 +  Calc.setTimeText(labelLabel,​Calc.addHours(Calc.val(new Var(rdbContacts,"​BIRTHDAY"​)),​5));​
 +</​code>​
 +==== Set label with calculated value ====
 +
 +Calculates a value based on dynamic or fixed data and sets the result as label text. The value can be calculated with any values from other tables, with parameters or specific texts (see [[#​list_of_formulas|List of Formulas]]).
 +
 +^Parameter ​   ^Description ​                                    ​^Example ​                                                                          ^
 +|**Label** ​   |the label element (Button, Label, Group Panel) ​ |**[Label: Total]** ​                                                               |
 +|**Formula** ​ |the formula for calculation ​                    ​|**[Order Details.Unit Price]*[Order Details.Quantity]*[Order Details.Dsicount]** ​ |
 +
 +<code java>
 +Calc.setText(labelTotalPrice,​Calc.val(new Var(rdbOrderdetails,"​UNIT_PRICE"​)) * Calc.val(new Var(rdbOrderdetails,"​QUANTITY"​)) * Calc.val(new Var(rdbOrderdetails,"​DSICOUNT"​)),​null);​
 +</​code>​
 +==== Set read ahead count ====
 +
 +Sets the number of records which will be loaded initially.
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  |the table    |**[Table: Contacts]** ​ |
 +|**Amount** ​ |the amount ​  ​|10 ​                    |
 +
 +<code java>
 +rdbContacts.setReadAhead(10);​
 +</​code>​
 +==== Set search current user ====
 +
 +Sets the current username as the value of a search element.
 +
 +This action can be used to restrict access to information according to user roles. For example: * Administrator is able to see everything, no filter * Staff member can only see their own datasets, filtered by username
 +
 +Hint: When you start VisionX you are logged in as VisionX user. With this user no filter is set. To change the user there is a button "​Switch User" at the bottom right. Here you can choose if you want to use the VisionX user or one of the actual application users managed in the user management. It's also possible to Logout and Login (Button in the top navigation) as application user.
 +
 +^Parameter ​   ^Description ​        ​^Example ​                  ^
 +|**Element** ​ |the search element ​ |**[Search: Contacts.*]** ​ |
 +
 +<code java>
 +filterContacts.setValue(getConnection().getUserName());​
 +</​code>​
 +==== Set selected column ====
 +
 +Sets the current/​selected column.
 +
 +^Parameter ​  ​^Description ​ ^Example ​               ^
 +|**Table** ​  ​|tables ​      ​|**[Table:​ Contacts]** ​ |
 +|**Column** ​ |columns ​     |**[Lastname]** ​        |
 +
 +<code java>
 +rdbContacts.setSelectedColumn("​LASTNAME"​);​
 +</​code>​
 +==== Set selected row ====
 +
 +Sets the current/​selected row number.
 +
 +^Parameter ​      ​^Description ​         ^Example ​               ^
 +|**Table** ​      |the table element ​   |**[Table: Contacts]** ​ |
 +|**Row number** ​ |number or parameter ​ |**2** ​                 |
 +
 +<code java>
 +rdbContacts.setSelectedRow(2);​
 +</​code>​
 +Hint: The row numbers start at 0 and not at 1. For example, the row numbered 2 is the 3rd row in the table.
 +
 +==== Set value ====
 +
 +Sets a value into a column. The value can be any text, value from another table or a parameter.
 +
 +^Parameter ​    ​^Description ​                   ^Example ​               ^
 +|**Write to**  |the column ​                    ​|**[Contacts.Email]** ​  |
 +|**Value** ​    ​|text,​ column value, parameter ​ |**[Customers.email]** ​ |
 +
 +<code java>
 +DataBookUtil.set(new Var(rdbContacts,"​EMAIL"​),​rdbCustomers.getValue("​EMAIL"​));​
 +</​code>​
 +Hint: This command can be used to copy values (text, date, numerical) from one table column to another. E.g.: [Contacts.Email] = [Customers.email]. As a result, the email of the customers table is copied to the email of the contacts table.
 +
 +==== Set value with concatenated text ====
 +
 +Sets a concatenated text into a column. The text can contain values from other tables, from parameters and any texts.
 +
 +^Parameter ​    ​^Description ​ ^Example ​                                       ^
 +|**Write to**  |the column ​  ​|**[Customers.name]** ​                          |
 +|**Text** ​     |the text     ​|**[Contacts.Lastname],​ [Contacts.Firstname]** ​ |
 +
 +<code java>
 +Text.set(new Var(rdbCustomers,"​NAME"​),​Text.val(new Var(rdbContacts,"​LASTNAME"​)) + ", " + Text.val(new Var(rdbContacts,"​FIRSTNAME"​)));​
 +</​code>​
 Hint: This command can be used to populate text columns with fixed text or values from other columns. In the example below, the value from "​Lastname",​ the fixed text ", " (comma + space) and the value from "​Firstname"​ is written to the column "​Name":​ "Doe, John". Hint: This command can be used to populate text columns with fixed text or values from other columns. In the example below, the value from "​Lastname",​ the fixed text ", " (comma + space) and the value from "​Firstname"​ is written to the column "​Name":​ "Doe, John".
  
-<​code>​ +==== Store selected record ==== 
-Text.set(new Var(rdbContacts,"​NAME"​),​ + 
-    Text.val(new Var(rdbContacts,"​LASTNAME"​)) +  +Stores the currently selected row in the selected table, to enable selection of that row at a later time
-    ​", " + + 
-    Text.val(new Var(rdbContacts,"​FIRSTNAME"​)))+Hint: You can restore a stored selected record only within the same action
 + 
 +For example: - store selected record - loop through all records of the table - restore selected record 
 + 
 +^Parameter ​ ^Description ​ ^Example ​              ^ 
 +|**Table** ​ |the table    |**[Table:​Contacts]** ​ | 
 + 
 +<code java> 
 +DataBookUtil.storeSelection(rdbContacts);
 </​code>​ </​code>​
-=== Set Value ===+===== Debug =====
  
-The value in a specified table column (source) is written to another table column (target).+==== Debug log ====
  
-Parameters: ''​%%[Target:​ List of all columns of all tables in the workscreen][Source: List of all columns ​of all tables in the workscreen]%%''​+Logs a debug message. The message can be a textcolumn value, a filter value, a parameter or a combination ​of all.
  
-Example: Set Value | [Contacts.Filename] | [Details.Filename]+^Parameter ​   ^Description ​                                                       ^Example ​              ^ 
 +|**Message** ​ |text, column value, filter value, parameter, concatenation of all  |**[Contacts.Email]**  ​|
  
-Hint: This command can be used to copy values ​(text, date, numerical) from one table column to anotherE.g.: [Contacts.Filename] ​[Details.Filename]. As a result, the file name of the details table is copied to the file name of the contacts table.+<code java> 
 +debug(rdbContacts.getValue("​EMAIL"​));​ 
 +</​code>​ 
 +==== Error log ====
  
-<​code>​ +Logs an error message. The message can be a column value, a filter value or a parameter. 
-DataBookUtil.set(new Var(rdbContacts,"​FILENAME"​),​ + 
-    rdbDetails.getValue("​FILENAME"))+^Parameter ​   ^Description ​                                                       ^Example ​              ^ 
 +|**Message** ​ |text, column value, filter value, parameter, concatenation of all  |**[Contacts.Email]** ​ | 
 + 
 +<​code ​java
 +error(rdbContacts.getValue("​EMAIL"));
 </​code>​ </​code>​
-=== Set Current Date ===+==== Info log ====
  
-The current time and date are written to the specified table column.+Logs an info message. ​The message can be a column ​value, a filter value or a parameter.
  
-Parameters: ''​%%[List ​of all columns of all tables in the workscreen]%%''​+^Parameter ​   ^Description ​                                                       ^Example ​              ^ 
 +|**Message** ​ |text, column value, filter value, parameter, concatenation ​of all  ​|**[Contacts.Email]**  |
  
-Example: Set Current Date | [Contacts.Birthday]+<code java> 
 +info(rdbContacts.getValue("​EMAIL"​));​ 
 +</​code>​ 
 +==== Print to console ====
  
-Hint: This command can be used to pre-fill all date columns with the current dateAnother application is the creation of a log that shows when a record was added or changed. It is good practice to add changed_on, created_on table columns for all relevant tables!+Prints a message ​to the console.
  
-<​code>​ +^Parameter ​ ^Description ​                                                       ^Example ​              ^ 
-Text.set(new Var(rdbContacts,"​BIRTHDAY"​)+|**Text** ​  ​|text,​ column value, filter value, parameter, concatenation of all  |**[Contacts.Email]** ​ | 
-    new Date())+ 
 +<​code ​java
 +System.out.println((String)rdbCustomers.getValue("​EMAIL"​));
 </​code>​ </​code>​
-=== Set Current User ===+===== Documents =====
  
-The name of the current user is inserted in the specified databook column.+==== Download file ====
  
-Parameters: ''​%%[List of all columns of all databooks in workscreen]%%''​+Downloads the selected file. The file can be saved to local hard drive and then opened.
  
-Example: Set current user | [Contacts.Username]+^Parameter ​    ​^Description ​                                 ^Example ​                 ^ 
 +|**Filename** ​ |text, parameter, column value, filter value  |**[Contacts.Filename]**  | 
 +|**Content** ​  ​|text,​ parameter, column value, filter value  |**[Contacts.Image]** ​    |
  
-Hint: One application of this command is the creation of a log showing which user created or edited a datasetIt is good practice to add changed_bycreated_by columns for all relevant databooks!+<code java> 
 +ProjXUtil.downloadFile(this,​(String)rdbContacts.getValue("​FILENAME"​),rdbContacts.getValue("​IMAGE"​));​ 
 +</​code>​ 
 +==== Download report ====
  
-<​code>​ +Downloads the selected, previously created, report. The report can be saved on a local hard drive and then opened. 
-Text.set(new Var(rdbContacts,"​LASTNAME"​)+ 
-    getConnection().getUserName())+^Parameter ​  ​^Description ​               ^Example ​                  ^ 
 +|**Report** ​ |previously created report ​ |**List Report Contacts** ​ | 
 + 
 +<​code ​java
 +getApplication().getLauncher().saveFileHandle(getListReportContacts());
 </​code>​ </​code>​
-=== Set Filter Value ===+==== Import report (insert) / (merge) ====
  
-The specified filter is set with the specified value. All filter editors used in the workscreen can be used as filters. They can be placed on the workscreen via the GUI Designer's data areaA full text filter or a filter for a selected ​table column can then be defined. "​Similar"​"​equal"​"​equal ​or smaller",​ "equal or greater"​ and "​greater"​ can be used as filtersAfter the value is set, the filter ​is applied to all rows of the associated tableand only the resulting ​rows are visible.+Imports ​the selected report. All of the report's data is imported to the relevant rows and fields of the screenIf **Merge** is selected, ​only changeddeleted ​or new data is importedData that already exists ​is not added. If **Insert** ​is used, all data rows, including existing ​rows (tested for similarity) ​are transferred.
  
-Parameters: ''​%%[List of all filter editors of the workscreen],​ [Value ​for which all rows are searched]%%''​+This functionality is only available ​for XLSX (Excel) and XML reports that were created with VisionX. Of course, the report templates can be edited. This is command is used to import offline forms into the application.
  
-Example: Set filter value [Search: ​Contacts.*Johanna+^Parameter ​    ​^Description ​                           ^Example ​                         ^ 
 +|**Template** ​ |previously created xlsx or xml report ​ |**List Report ​Contacts ​(xlsx)* |
  
-All datasets that contain"//Johanna//" are shown in the Contacts table.+<code java> 
 +merge: 
 +ProjXUtil.importFile(this,​"/reports/screens/NeuWorkScreen$ContactsList.xlsx",​true);​
  
-HintThis command can be used to restrict access to information according to user rolesRole restriction at the data level!+insert: 
 +ProjXUtil.importFile(this,"/​reports/​screens/​NeuWorkScreen$ContactsList.xlsx",​false);​ 
 +</​code>​ 
 +==== Remove file ====
  
-  * Administrator is able to see everything, no filter +Removes a file or report from the selected record. The columns in which the filename and the content was stored must be specified.
-  * Staff member can only see their own datasets, filtered by username +
-  * Department manager can only see own department'​s datasets, filtered by department+
  
-Another application of this command is the search for a specified dataset based on a master data listE.g.: Search for status "​complete",​ after which the "​ID" ​column ​can be transferred from the master data table to the main table (e.g. to preset the status as default ​value).+^Parameter ​    ​^Description ​  ​^Example ​                 ^ 
 +|**Filename** ​ |column value  |**[Contacts.Filename]** ​ | 
 +|**Content** ​  |column value  ​|**[Contacts.Image]** ​    |
  
-<​code>​ +<​code ​java
-edtSearch.setValue("Johanna")+ProjXUtil.deleteFile(new Var(rdbContacts,​"FILENAME"),new Var(rdbContacts,"​IMAGE"​));​
 </​code>​ </​code>​
-=== Set Filter Current User ===+==== Save report ====
  
-The current username ​is set as the filter value for the specified filter.+Saves the specified report in a table. ​The save location ​is defined via two parameters: The report'​s file name is saved in a text column of the table; ​the file itself is saved in the current record of a table column of the type Image or File.
  
-Parameters: ''​%%[List of all filter editors of the workscreen]%%''​+^Parameter ​    ​^Description ​               ^Example ​                  ^ 
 +|**Filename** ​ |column ​                    |**[Contacts.Filename]**   | 
 +|**Content** ​  ​|column ​                    ​|**[Contacts.Image]** ​     | 
 +|**Report** ​   |previously created report ​ |**List Report Contacts** ​ |
  
-Example: Set Filter Current User | [Search: Contacts.Username]+<code java> 
 +ProjXUtil.storeFileHandle(new Var(rdbContacts,"​REPORT_NAME"​),​new Var(rdbContacts,"​REPORT_FILE"​),​getListReportContacts());​ 
 +</​code>​ 
 +==== Show file ====
  
-Hint: This command can be used to restrict access to information according to user rolesRole restriction at the data level!+Shows the selected fileThe file is either displayed in a browser or opened using the relevant program (e.g. Word, Excel), depending on how the PC is configured.
  
-  ​Administrator is able to see everythingno filter +^Parameter ​    ​^Description ​                                 ^Example ​                 ^ 
-  ​* ​Staff member can only see their own datasetsfiltered by username+|**Filename** ​ |text, parameter, column value, filter ​value  |**[Contacts.Filename]** ​ | 
 +|**Content** ​  |textparameter, column value, filter value  |**[Contacts.Image]** ​    |
  
 <code java> <code java>
-edtSearch.setValue(getConnection().getUserName())+ProjXUtil.showFile(this,(String)rdbContacts.getValue("​FILENAME"​),​rdbContacts.getValue("​IMAGE"​));
 </​code>​ </​code>​
-=== Set Column Readonly ​===+==== Show report ====
  
-The specified ​databook column ​is set to read-only.+Shows the specified ​report. The report is either displayed in a browser or opened using the relevant program (e.g. Word, Excel), depending on how the PC is configured.
  
-Parameters: ''​%%[List of all columns of all databooks in a workscreen]%%''​+^Parameter ​  ​^Description ​                        ​^Example ​                  ^ 
 +|**Report** ​ |list of previously created reports ​ |**List Report Contacts** ​ |
  
-Example: Set column readonly | [Contacts.Username]+<code java> 
 +getApplication().getLauncher().showFileHandle(getListReportContacts());​ 
 +</​code>​ 
 +==== Upload file ====
  
-Hint: This command sets both the column in the table as well as the associated editor on the form to read-only!+Saves a file in the current record. The name of the uploaded file is saved in a text column; the file itself is saved in a column of type Image or File. 
 + 
 +^Parameter ​    ​^Description ​                              ​^Example ​                 ^ 
 +|**Filename** ​ |column for the name                       ​|**[Contacts.Filename]** ​ | 
 +|**Content** ​  ​|column for the data (type image or file)  |**[Contacts.Image]** ​    |
  
 <code java> <code java>
-DataBookUtil.setColumnReadOnly(new Var(rdbContacts,"​USERNAME"))+ProjXUtil.showFile(this,(String)rdbContacts.getValue("​FILENAME"​),rdbContacts.getValue("IMAGE"));
 </​code>​ </​code>​
-=== Set Column Editable ​===+===== Table control =====
  
-The specified databook column is set to read-write access.+==== Disable header sorting ====
  
-Parameters: ''​%%[List of all columns of all databooks ​in a workscreen]%%''​+Disables header sorting by click in the header columns.
  
-Example: Set column editable ​| [Contacts.Username]+^Parameter ​ ^Description ​          ^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView: ​Contacts]**  |
  
-Hint: This command sets both the column ​in the table as well as the associated editor on the form to read-write!+<code java> 
 +tableContacts.setSortOnHeaderEnabled(false);​ 
 +</​code>​ 
 +==== Enable header sorting ==== 
 + 
 +Enables header sorting by click in the header columns. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]** ​ |
  
 <code java> <code java>
-DataBookUtil.setColumnEditable(new Var(rdbContacts,"​USERNAME"​))+tableContacts.setSortOnHeaderEnabled(false);
 </​code>​ </​code>​
-=== Enable Insert in table ===+==== Hide Delete button ====
  
-Enables ​the insertion of rows in the specified databook.+Hides the '​delete record'​ button ​in the table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]** ​ | 
 + 
 +<code java> 
 +tableContacts.setDeleteVisible(false);​ 
 +</​code>​ 
 +==== Hide Duplicate button ====
  
-Parameters: ​''​%%[List of all databooks ​in a workscreen]%%''​+Hides the 'duplicate record' ​button ​in the table view.
  
-Example: Enable insert in table | [Databook: Contacts]+^Parameter ​ ^Description ​          ^Example ​                   ^ 
 +|**Table** ​ |table view in screen  ​|**[TableView: Contacts]**  |
  
 <code java> <code java>
-rdbContacts.setInsertEnabled(true)+tableContacts.setDuplicateVisible(false);
 </​code>​ </​code>​
-=== Disable Insert in table ===+==== Hide Edit button ====
  
-Disables ​the insertion of rows in the specified databook.+Hides the 'edit record'​ button ​in the table view.
  
-Parameters: ''​%%[List of all databooks ​in a workscreen]%%''​+^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]**  |
  
-Example: Disable insert ​in table | [Databook: Contacts]+<code java> 
 +tableContacts.setEditVisible(false);​ 
 +</​code>​ 
 +==== Hide Export button ==== 
 + 
 +Hides the '​export'​ button ​in the table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView: Contacts]**  |
  
 <code java> <code java>
-rdbContacts.setInsertEnabled(false)+tableContacts.setExportVisible(false);
 </​code>​ </​code>​
-=== Enable Edit in table ===+==== Hide New button ====
  
-Enables editing of data in the specified databook.+Hides the '​insert new record'​ button ​in the table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]** ​ | 
 + 
 +<code java> 
 +tableContacts.setInsertVisible(false);​ 
 +</​code>​ 
 +==== Hide Search button ====
  
-Parameters: ​''​%%[List of all databooks ​in a workscreen]%%''​+Hides the 'search record' ​button ​in the table view.
  
-Example: Enable edit in table | [Databook: Contacts]+^Parameter ​ ^Description ​          ^Example ​                   ^ 
 +|**Table** ​ |table view in screen  ​|**[TableView: Contacts]**  |
  
 <code java> <code java>
-rdbContacts.setUpdateEnable(true)+tableContacts.setSearchVisible(false);
 </​code>​ </​code>​
-=== Disable Edit in table ===+==== Hide Search record ====
  
-Disables editing of data in the specified databook.+It is possible to search directly ​in a table view. If such a search was performed, this action can be used to disable ​the search restriction. '​Enable Search button'​ restores the restriction by the search terms.
  
-Parameters: ''​%%[List of all databooks ​in a workscreen]%%''​+^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]**  |
  
-Example: Disable edit in table | [Databook: Contacts]+<code java> 
 +tableContacts.setSearchEnabled(false);​ 
 +</​code>​ 
 +==== Hide focus rectangle ==== 
 + 
 +Hides the focus style of the selected cell in the table view. A selected cell has no additional frame. The cell looks unselected. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView: Contacts]**  |
  
 <code java> <code java>
-rdbContacts.setUpdateEnabled(false)+tableContacts.setShowFocusRect(false);
 </​code>​ </​code>​
-=== Enable Delete ​in table ===+Hint: This action does not work in the web application
  
-Enables deletion of rows in the specified table.+==== Hide gridlines ====
  
-Parameters: ''​%%[List of all databooks ​in a workscreen]%%''​+Hides the horizontal and vertical gridlines ​in the table view.
  
-Example: Enable delete in table | [Databook: Contacts]+^Parameter ​ ^Description ​          ^Example ​                   ^ 
 +|**Table** ​ |table view in screen  ​|**[TableView: Contacts]**  |
  
 <code java> <code java>
-rdbContacts.setDeleteEnabled(true)+tableContacts.setShowGridLines(false);
 </​code>​ </​code>​
-=== Disable Delete in table ===+==== Hide horizontal lines ====
  
-Disables deletion of rows in the specified ​table.+Hides the horizontal lines in the table view.
  
-Parameters: ''​%%[List of all databooks ​in a workscreen]%%''​+^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]**  |
  
-Example: Disable delete ​in table | [Databook: Contacts]+<code java> 
 +tableContacts.setShowHorizontalLines(false);​ 
 +</​code>​ 
 +==== Hide selection ==== 
 + 
 +Disables highlighting of the selected record ​in the table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView: Contacts]**  |
  
 <code java> <code java>
-rdbContacts.setDeleteEnabled(false)+tableContacts.setShowSelection(false);
 </​code>​ </​code>​
-=== Enable data manipulation in table ===+==== Hide table control buttons ====
  
-Enables all data manipulation (insert, edit, delete) in the specified databook.+Hides the navigation toolbar for the selected table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]** ​ | 
 + 
 +<code java> 
 +tableContacts.setToolBarVisible(false);​ 
 +</​code>​ 
 +==== Hide vertical lines ====
  
-Parameters: ''​%%[List of all databooks ​in a workscreen]%%''​+Hides the vertical lines in the table view.
  
-Example: Enable data manipulation in table | [Databook: Contacts]+^Parameter ​ ^Description ​          ^Example ​                   ^ 
 +|**Table** ​ |table view in screen  ​|**[TableView: Contacts]**  |
  
 <code java> <code java>
-rdbContacts.setReadOnly(false)+tableContacts.setShowVerticalLines(false);
 </​code>​ </​code>​
-=== Disable data manipulation in table ===+==== Set maximum row height ====
  
-Disables all data manipulation (insert, edit, delete) in the specified databook.+Sets the maximum row height of a table view.
  
-Parameters: ''​%%[List of all databooks ​in a workscreen]%%''​+^Parameter ​  ​^Description ​          ​^Example ​                   ^ 
 +|**Table** ​  ​|table view in screen ​ |**[TableView:​ Contacts]**  | 
 +|**Height** ​ |number, parameter ​    ​|**30** ​                    |
  
-ExampleDisable data manipulation in table | [Databook: Contacts]+<code java> 
 +tableContacts.setMaxRowHeight(30);​ 
 +</​code>​ 
 +HintThe height of the header line is not changed. 
 + 
 +==== Set minimum row height ==== 
 + 
 +Sets the minimum row height of a table view. 
 + 
 +^Parameter ​  ​^Description ​          ​^Example ​                   ^ 
 +|**Table** ​  ​|table view in screen ​ |**[TableView: Contacts]**  | 
 +|**Height** ​ |number, parameter ​    ​|**30** ​                    |
  
 <code java> <code java>
-rdbContacts.setReadOnly(true)+tableContacts.setMinRowHeight(30);
 </​code>​ </​code>​
-==== Table view (Navigation table) commands ====+Hint: The height of the header line is not changed.
  
-=== Show Insert Button ​===+==== Set row height ====
  
-The "​Insert"​ button on the toolbar ​of the specified ​table view is shown.+Set the row height ​of table view.
  
-Parameters: ''​%%[List of all table views in the workscreen]%%''​+^Parameter ​  ​^Description ​          ​^Example ​                   ^ 
 +|**Table** ​  |table view in screen ​ |**[TableView:​ Contacts]**  | 
 +|**Height** ​ |number, parameter ​    ​|**50** ​                    |
  
-ExampleShow insert button[Table view: Contacts]+<code java> 
 +tableContacts.setRowHeight(50);​ 
 +</​code>​ 
 +HintThe height of the header line is not changed. 
 + 
 +==== Set sort order column name ==== 
 + 
 +Defines in which column the sort order is stored as a numerical value. The sorting starts at 0 and the table view is sorted by this column. In the table view navigation, there are two new buttons 'move up' and 'move down' to move a record up or down in the sort order. 
 + 
 +^Parameter ​  ​^Description ​          ​^Example ​                   ^ 
 +|**Table**   ​|table ​view in screen ​ |**[TableView: Contacts]**  | 
 +|**Column** ​ |table column ​         |**[Contacts.sorting]** ​    |
  
 <code java> <code java>
-navContacts.setInsertVisible(true)+tableContacts.setSortOrderColumnName("​SORTING"​);
 </​code>​ </​code>​
-=== Hide Insert Button ​===+==== Show Delete button ====
  
-The "​Insert" ​button ​on the toolbar of the specified ​table view is hidden.+Shows the '​delete recored' ​button ​in the table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]** ​ | 
 + 
 +<code java> 
 +tableContacts.setDeleteVisible(true);​ 
 +</​code>​ 
 +==== Show Duplicate button ====
  
-Parameters: ​''​%%[List of all table views in the workscreen]%%''​+Shows the 'duplicate record' ​button ​in the table view.
  
-Example: Hide insert button ​[Table view: Contacts]+^Parameter ​ ^Description ​          ^Example ​                   ^ 
 +|**Table**  |table ​view in screen ​ |**[TableView: Contacts]**  |
  
 <code java> <code java>
-navContacts.setInsertVisible(false)+tableContacts.setDuplicateVisible(true);
 </​code>​ </​code>​
-=== Show Edit Button ​===+==== Show Edit button ====
  
-The "​Edit"​ button on the toolbar of the specified ​table view is shown.+Shows the 'edit record'​ button in the table view.
  
-Parameters: ''​%%[List of all table views in the workscreen]%%''​+^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]**  |
  
-Example: ​Show edit button | [Table view: Contacts]+<code java> 
 +tableContacts.setEditVisible(true);​ 
 +</​code>​ 
 +==== Show Export ​button ​==== 
 + 
 +Shows the '​export'​ button in the table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table**  |table ​view in screen ​ |**[TableView: Contacts]**  |
  
 <code java> <code java>
-navContacts.setEditVisible(true)+tableContacts.setExportVisible(true);
 </​code>​ </​code>​
-=== Hide Edit Button ​===+==== Show New button ====
  
-The "​Edit" ​button ​on the toolbar of the specified ​table view is hidden.+Shows the '​insert new record' ​button ​in the table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]** ​ | 
 + 
 +<code java> 
 +tableContacts.setInsertVisible(false);​ 
 +</​code>​ 
 +==== Show Search button ====
  
-Parameters: ​''​%%[List of all table views in the workscreen]%%''​+Hides the 'search record' ​button ​in the table view.
  
-Example: Hide edit button ​[Table view: Contacts]+^Parameter ​ ^Description ​          ^Example ​                   ^ 
 +|**Table**  |table ​view in screen ​ |**[TableView: Contacts]**  |
  
 <code java> <code java>
-navContacts.setEditVisible(false)+tableContacts.setSearchVisible(true);
 </​code>​ </​code>​
-=== Show Delete Button ​===+==== Show Search record ====
  
-The "​Delete"​ button on the toolbar of the specified ​table view is shown.+It is possible to search directly in a table view. If such a search was performed and disabled, this action can be used to enable ​the search restriction again. The table view is now again filtered according to the previously entered search terms.
  
-Parameters: ''​%%[List of all table views in the workscreen]%%''​+^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]**  |
  
-Example: ​Show delete button ​[Table view: Contacts]+<code java> 
 +tableContacts.setSearchEnabled(true);​ 
 +</​code>​ 
 +==== Show focus rectangle ==== 
 + 
 +Shows the focus style of the selected cell in the table view. A selected cell has an additional frame. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table**  |table ​view in screen ​ |**[TableView: Contacts]**  |
  
 <code java> <code java>
-navContacts.setDeleteVisible(true)+tableContacts.setShowFocusRect(true);
 </​code>​ </​code>​
-=== Hide Delete Button ​===+==== Show gridlines ====
  
-The "​Delete"​ button on the toolbar of the specified ​table view is hidden.+Shows the horizontal and vertical gridlines in the table view.
  
-Parameters: ''​%%[List of all table views in the workscreen]%%''​+^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]**  |
  
-Example: Hide delete button ​[Table view: Contacts]+<code java> 
 +tableContacts.setShowGridLines(true);​ 
 +</​code>​ 
 +==== Show horizontal lines ==== 
 + 
 +Shows the horizontal lines in the table view. 
 + 
 +^Parameter ​ ^Description ​          ^Example ​                   ^ 
 +|**Table**  |table ​view in screen ​ |**[TableView: Contacts]**  |
  
 <code java> <code java>
-navContacts.setDeleteVisible(false)+tableContacts.setShowHorizontalLines(true);
 </​code>​ </​code>​
-=== Show Export Button ​===+==== Show selection ====
  
-The "​Export"​ button on the toolbar ​of the specified ​table view is shown.+Disables highlighting ​of the selected record in the table view.
  
-Parameters: ''​%%[List of all table views in the workscreen]%%''​+^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]**  |
  
-Example: ​Show export button ​[Table view: Contacts]+<code java> 
 +tableContacts.setShowSelection(false);​ 
 +</​code>​ 
 +==== Show table control buttons ==== 
 + 
 +Shows the navigation toolbar for the selected table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table**  |table ​view in screen ​ |**[TableView: Contacts]**  |
  
 <code java> <code java>
-navContacts.setExportVisible(true)+tableContacts.setToolBarVisible(true)
 +</​code>​ 
 +==== Show vertical lines ====
  
-#### Hide Export Button+Shows the vertical lines in the table view. 
 + 
 +^Parameter ​ ^Description ​          ​^Example ​                   ^ 
 +|**Table** ​ |table view in screen ​ |**[TableView:​ Contacts]** ​ | 
 + 
 +<code java> 
 +tableContacts.setShowVerticalLines(true);​
 </​code>​ </​code>​
-The "​Export"​ button on the toolbar of the specified table view is hidden.+===== Tools ===== 
 + 
 +==== Call server action ====
  
-Parameters: ​''​%%[List of all table views in the workscreen]%%''​+Calls a server action or a stored procedure from the database. The parameters of this action are different, depending on which server action is selected. ​'sendMail' ​for example has the following parameters: pFrom, pTo, pSubject, pText, pFileName, pContent
  
-Example: Hide export button ​[Table view: Contacts]+^Parameter ​         ^Description ​            ^Example ​      ^ 
 +|**Server action** ​ |list of server actions ​ |**doCommit**  ​|
  
 <code java> <code java>
-navContacts.setExportVisible(false)+getConnection().callAction("​doCommit"​);
 </​code>​ </​code>​
-=== Show Navigation ​===+==== Open Website ====
  
-The navigation toolbar is shown for the specified table view.+Opens an Website in a web browser.
  
-Parameters''​%%[List of all table views in the workscreen]%%''​+HintDepending on the browser settings you may have to allow the pop up the first time.
  
-Example: Show navigation ​[Table view: Contacts]+^Parameter ​ ^Description ​                                                       ^Example ​      ^ 
 +|**URL** ​   |text, parameter, column value, filter value, concatenation of all  |**doCommit**  ​|
  
 <code java> <code java>
-navContacts.setToolBarVisible(true)+getApplication().getLauncher().showDocument("​https://​www.sibvisions.com/",​null,"​_blank"​);​
 </​code>​ </​code>​
-=== Hide Navigation ​===+==== QR Contact ====
  
-The navigation toolbar is hidden for the specified table view.+Converts ​the given contact information into a QR code and saves it in the selected image column. Parameters can be left empty.
  
-Parameters: ''​%%[List of all table views in the workscreen]%%''​+^Parameter ​        ​^Description ​                                 ^Example ​                       ^ 
 +|**Write to**      |column ​                                      |**[Contacts.QR]**              | 
 +|**Name** ​         |text, parameter, column value, filter value  |**[Contacts.QR]** ​             | 
 +|**Company** ​      ​|text,​ parameter, column value, filter value  |**[Customers.company name]** ​  | 
 +|**Title** ​        ​|text,​ parameter, column value, filter value  |**[Contacts.Academic Title]** ​ | 
 +|**Phone number** ​ |text, parameter, column value, filter value  |**[Contacts.QR]** ​             | 
 +|**E-Mail** ​       |text, parameter, column value, filter value  |**[Contacts.Email]** ​          | 
 +|**Address** ​      ​|text,​ parameter, column value, filter value  |**{address}** ​                 | 
 +|**Website** ​      ​|text,​ parameter, column value, filter value  |                               | 
 +|**Note** ​         |text, parameter, column value, filter value  |**[Contacts.description]** ​    |
  
-ExampleHide navigation ​| [Table view: Contacts]+<code java> 
 +QRUtil.setContact(getConnection(),​new Var(rdbContacts,"​QR"​),​(String)getParameter("​name"​),"",​(String)rdbContacts.getValue("​ACTI_ACADEMIC_TITLE"​),"",​(String)rdbContacts.getValue("​EMAIL"​),​(String)getParameter("​address"​),"",​(String)rdbContacts.getValue("​DESCRIPTION"​));​ 
 +</​code>​ 
 +HintIf several columns should be merged into one text, this is possible via parameters. Before the action a parameter can be set and this can be used in the action. For more information see 'Set Parameter',​ 'Set Parameter with concatenated text', 'Set Parameter with calculated value'​. 
 + 
 +==== QR E-Mail ==== 
 + 
 +Converts the E-Mail address into a QR code and saves it in the selected image column. 
 + 
 +^Parameter ​    ​^Description ​                                 ^Example ​              ^ 
 +|**Write to**  |column ​                                      |**[Contacts.QR]**     | 
 +|**E-Mail** ​   |text, parameter, column value, filter value  |**[Contacts.Email]** ​ |
  
 <code java> <code java>
-navContacts.setToolBarVisible(false)+QRUtil.setEMail(getConnection(),​new Var(rdbContacts,"​QR"​),​(String)rdbContacts.getValue("​EMAIL"​));
 </​code>​ </​code>​
-=== Hide Column ​===+==== QR Geo location ====
  
-The specified table column ​is hidden.+Converts the given location into a QR code and saves it in the selected ​column.
  
-Parameters: ''​%%[List of all columns of all tables in a workscreen]%%''​+^Parameter ​     ^Description ​                                 ^Example ​               ^ 
 +|**Write to**   ​|column ​                                      |**[Contacts.QR]**      | 
 +|**Latitude** ​  ​|text,​ parameter, column value, filter value  |**48.24669129999999** ​ | 
 +|**Longitude** ​ |text, parameter, column value, filter value  |**16.3798883** ​        | 
 + 
 +<code java> 
 +QRUtil.setGeoLocation(getConnection(),​new Var(rdbContacts,"​QR"​),"​48.24669129999999","​16.3798883",​null);​ 
 +</​code>​ 
 +==== QR Phone number ====
  
-Example: Hide column ​| [Contacts.Username]+Converts the given phone number into a QR code and saves it in the selected image column.
  
-Hint: This command is used to hide table columns irrespective of user roles.+^Parameter ​        ​^Description ​                                 ^Example ​              ^ 
 +|**Write ​to**      |column ​                                      ​|**[Contacts.QR]**     | 
 +|**Phone Number** ​ |text, parameter, column value, filter value  |**+43 1 934 6009 0**  |
  
 <code java> <code java>
-DataBookUtil.hideColumn(new Var(rdbContacts,"​USERNAME"));+QRUtil.setPhoneNumber(getConnection(),​new Var(rdbContacts,"​QR"),"+43 1 934 6009 0");
 </​code>​ </​code>​
-=== Autoresize Columns ​===+==== QR Text ====
  
-Automatically sets column widths for the selected table view. Widths are determined dynamically based on the database column width and the actual values ​in the columns.+Converts ​the given text into a QR code and saves it in the selected image column.
  
-Parameters: ''​%%[List of all table views in the workscreen]%%''​+^Parameter ​    ​^Description ​                                 ^Example ​           ^ 
 +|**Write to**  |column ​                                      |**[Contacts.QR]**  | 
 +|**Text** ​     |text, parameter, column value, filter value  |**VisionX** ​       |
  
-ExampleAutoresize columns ​| [Table view: Contacts]+<code java> 
 +QRUtil.setText(getConnection(),​new Var(rdbContacts,"​QR"​),"​VisionX"​);​ 
 +</​code>​ 
 +==== Send e-mail ==== 
 + 
 +Sends an email message using the application settings. One file can be attached. Before this action can be used, the mail server must be configured under **Settings -> E-Mail**. The needed Parameters areServer, Port, TLS Username, Password Default Sender Default Html 
 + 
 +Hint: Filename and data can be left empty if no attachment is to be sent. 
 + 
 +^Parameter ​    ​^Description ​                                                       ^Example ​                                                                            ^ 
 +|**From** ​     |text, parameter, column value, filter value                        |**application.email@test.com** ​                                                     | 
 +|**To** ​       |text, parameter, column value, filter value                        |**[Contacts.Email]**                                                                | 
 +|**Subject** ​  ​|text,​ parameter, column value, filter value                        |**Subject** ​                                                                        | 
 +|**Text** ​     |text, column value, filter value, parameter, concatenation of all  |**Dear [Contacts.Firstname] [Contacts.Lastname],​ this is the body of the e-mail.** ​ | 
 +|**Filename** ​ |text, parameter, column value, filter value                        |**[Contacts.report name]** ​                                                         | 
 +|**Data** ​     |column value (File or Image) ​                                      ​|**[Contacts.report file]** ​                                                         |
  
 <code java> <code java>
-navContacts.setAutoResize(true)+getConnection().callAction("​sendMail","​application.email@test.com",​(String)rdbContacts.getValue("​EMAIL"​),"​Subject","​Dear " + Text.val(new Var(rdbContacts,"​FIRSTNAME"​)) + " "+ Text.val(new Var(rdbContacts,"​LASTNAME"​))+ ",​\nthis is the body of the e-mail.",​(String)rdbContacts.getValue("​REPORT_NAME"​),​rdbContacts.getValue("​REPORT_FILE"​));
 </​code>​ </​code>​
-==== Change management commands ​====+==== Send e-mail with custom server ​====
  
-=== Discard all changes ===+This action can be used if you want to send from another server than defined in the application settings. It's possible to use TLS encryption. No HTML only plain text is possible. One file can be attached.
  
-All unsaved changes in all databooks of the current workscreen are discarded.+Hint: Filename and data can be left empty if no attachment is to be sent.
  
-Example: Discard all changes+If you want to use more than one server you can store the connection details in a server table, filter the table before sending and then you can use the table information.
  
-Hint: This command ​is used to discard charges on a form using a "​Cancel"​ button.+^Parameter ​     ^Description ​                                                       ^Example ​                                                                            ^ 
 +|**SMTP Host** ​ |text, parameter, column value, filter value                        |**host** ​                                                                           | 
 +|**SMTP Port** ​ |text, parameter, column value, filter value                        |**25** ​                                                                             | 
 +|**Username** ​  ​|text,​ parameter, column value, filter value                        |**Username** ​                                                                       | 
 +|**Password** ​  ​|text,​ parameter, column value, filter value                        |**Password** ​                                                                       | 
 +|**TLS** ​       |checkbox ​                                                          ​|**yes** ​                                                                            | 
 +|**From** ​      ​|text,​ parameter, column value, filter value                        |**application.email@test.com** ​                                                     | 
 +|**To** ​        ​|text,​ parameter, column value, filter value                        |**[Contacts.Email]** ​                                                               | 
 +|**Subject** ​   |text, parameter, column value, filter value                        |**Subject** ​                                                                        | 
 +|**Text** ​      ​|text,​ column value, filter value, parameter, concatenation of all  |**Dear [Contacts.Firstname] [Contacts.Lastname],​ this is the body of the e-mail.** ​ | 
 +|**Filename** ​  ​|text,​ parameter, column value, filter value                        |**[Contacts.report name]** ​                                                         | 
 +|**Data** ​      ​|column value (File or Image) ​                                      ​|**[Contacts.report file]** ​                                                         |
  
 <code java> <code java>
-getDataSource().restoreAllDataBooks()+getConnection().callAction("​sendMail","​host","​25","​Username","​Password",​Boolean.TRUE,​Boolean.FALSE,"​application.email@test.com",​(String)rdbContacts.getValue("​EMAIL"​),"​Subject","​Dear " + Text.val(new Var(rdbContacts,"​FIRSTNAME"​)) + " "+ Text.val(new Var(rdbContacts,"​LASTNAME"​))+ ",​\nthis is the body of the e-mail.",​(String)rdbContacts.getValue("​REPORT_NAME"​),​rdbContacts.getValue("​REPORT_FILE"​));
 </​code>​ </​code>​
-=== Save ===+==== Send e-mail with custom server (no TLS) ====
  
-Saves all unsaved changes ​in all databooks of the current workscreen.+This action can be used if you want to send from another server than defined ​in the application settings. It's not possible to use TLS encryption. No HTML only plain text is possible. One file can be attached.
  
-ExampleSave+HintFilename and data can be left empty if no attachment is to be sent.
  
-Hint: This command ​can be used before ​report ​is shown, or to save changes in a form using a "​Save"​ button.+If you want to use more than one server you can store the connection details in server table, filter the table before sending and then you can use the table information. 
 + 
 +^Parameter ​     ^Description ​                                                       ^Example ​                                                                            ^ 
 +|**SMTP Host** ​ |text, parameter, column value, filter value                        |**host** ​                                                                           | 
 +|**SMTP Port** ​ |text, parameter, column value, filter value                        |**25** ​                                                                             | 
 +|**Username** ​  ​|text,​ parameter, column value, filter value                        |**Username** ​                                                                       | 
 +|**Password** ​  ​|text,​ parameter, column value, filter value                        |**Password** ​                                                                       | 
 +|**From** ​      ​|text,​ parameter, column value, filter value                        |**application.email@test.com** ​                                                     | 
 +|**To** ​        ​|text,​ parameter, column value, filter value                        |**[Contacts.Email]** ​                                                               | 
 +|**Subject** ​   |text, parameter, column value, filter value                        |**Subject** ​                                                                        | 
 +|**Text** ​      ​|text,​ column value, filter value, parameter, concatenation of all  |**Dear [Contacts.Firstname] [Contacts.Lastname],​ this is the body of the e-mail.** ​ | 
 +|**Filename** ​  |textparameter, column value, filter value                        |**[Contacts.report name]** ​                                                         | 
 +|**Data** ​      ​|column value (File or Image) ​                                      ​|**[Contacts.report file]** ​                                                         |
  
 <code java> <code java>
-getDataSource().saveAllDataBooks()+getConnection().callAction("​sendMail","​host","​25","​Username","​Password","​application.email@test.com",​(String)rdbContacts.getValue("​EMAIL"​),"​Subject","​Dear " + Text.val(new Var(rdbContacts,"​FIRSTNAME"​)) + " "+ Text.val(new Var(rdbContacts,"​LASTNAME"​))+ ",​\nthis is the body of the e-mail.",​(String)rdbContacts.getValue("​REPORT_NAME"​),​rdbContacts.getValue("​REPORT_FILE"​));
 </​code>​ </​code>​
-=== Save table ===+==== Send html e-mail with custom server ====
  
-Saves all unsaved changes ​in the specified databook.+This action can be used if you want to send HTML Mails from another server than defined ​in the application settings. It's possible to use TLS encryption. One file can be attached.
  
-ExampleSave table+HintFilename and data can be left empty if no attachment is to be sent.
  
-Hint: This command can be used to save changes ​in a form using a "​Save"​ button.+If you want to use more than one server you can store the connection details ​in a server table, filter the table before sending and then you can use the table information. 
 + 
 +^Parameter ​     ^Description ​                                                       ^Example ​                                                                            ^ 
 +|**SMTP Host** ​ |text, parameter, column value, filter value                        |**host** ​                                                                           | 
 +|**SMTP Port** ​ |text, parameter, column value, filter value                        |**25** ​                                                                             | 
 +|**Username** ​  ​|text,​ parameter, column value, filter value                        |**Username** ​                                                                       | 
 +|**Password** ​  ​|text,​ parameter, column value, filter value                        |**Password** ​                                                                       | 
 +|**TLS** ​       |checkbox ​                                                          ​|**yes** ​                                                                            | 
 +|**From** ​      ​|text,​ parameter, column value, filter value                        |**application.email@test.com** ​                                                     | 
 +|**To** ​        ​|text,​ parameter, column value, filter value                        |**[Contacts.Email]** ​                                                               | 
 +|**Subject** ​   |text, parameter, column value, filter value                        |**Subject** ​                                                                        | 
 +|**Text** ​      ​|text,​ column value, filter value, parameter, concatenation of all  |**Dear [Contacts.Firstname] [Contacts.Lastname],​ this is the body of the e-mail.** ​ | 
 +|**Filename** ​  ​|text,​ parameter, column value, filter value                        |**[Contacts.report name]** ​                                                         | 
 +|**Data** ​      ​|column value (File or Image) ​                                      ​|**[Contacts.report file]** ​                                                         |
  
 <code java> <code java>
-rdbContacts.saveAllRows()+getConnection().callAction("​sendMail","​host","​25","​Username","​Password",​Boolean.TRUE,​Boolean.TRUE,"​application.email@test.com",​(String)rdbContacts.getValue("​EMAIL"​),"​Subject","​Dear " + Text.val(new Var(rdbContacts,"​FIRSTNAME"​)) + " "+ Text.val(new Var(rdbContacts,"​LASTNAME"​))+ ",​\nthis is the body of the e-mail.",​(String)rdbContacts.getValue("​REPORT_NAME"​),​rdbContacts.getValue("​REPORT_FILE"​));
 </​code>​ </​code>​
-=== Reload table ===+===== User interface =====
  
-Reloads all datasets in the specified databook from the database.+==== Activate autoresize columns ====
  
-Example: Reload ​table+Activates autoresize for the selected ​table view. If no width was set for a column, it will automatically be set so that all displayed columns have space on the screen.
  
-HintThis command is used to keep changes made by other users or in other workscreens to the same databook current.+^Parameter ​ ^Description ​ ^Example ​                   ^ 
 +|**Table** ​ |table view   ​|**[TableViewContacts]** ​ |
  
 <code java> <code java>
-rdbContacts.reload()+tableContacts.setAutoResize(true);
 </​code>​ </​code>​
-=== Reload all ===+==== Activate responsive design ====
  
-Reloads all databooks in the current workscreen from the database.+Activates responsive design for the selected element. Only works when the responsive mode is activated under **Settings -> Design**.
  
-Example: ​Reload all+^Parameter ​   ^Description ​ ^Example ​                                         ^ 
 +|**Element** ​ |Layout ​      ​|**[Advanced Form LayoutadvancedFormLayout1]** ​ |
  
 <code java> <code java>
-getDataSource().reloadAllDataBooks()+advancedFormLayout1.setResponsive(true);
 </​code>​ </​code>​
-=== Reload all screens ​===+==== Add style ====
  
-Reloads all databooks in all open workscreens from the database.+A CSS (Cascading Style Sheets) class can be assigned to an elementThis class must be defined under **Settings -> Web Application Settings -> Styles**
  
-ExampleReload all screens+{{:visionx:​actions:​actions12.png?​nolink|imgSmall}}
  
 <code java> <code java>
-((ProjX)getApplication()).doReload()+/* 
 +Put your custom application styles in this file. 
 +*/ 
 + 
 +.colorGreen .v-panel-caption { 
 +color: green; 
 +}
 </​code>​ </​code>​
-=== Manual Save and Reload ===+This action works only in the web.
  
-The current workscreen is decoupled from the application toolbar. Clicking "​Save"​ or "​Reload"​ on the toolbar is ignored within the current workscreen. This is a useful feature for typical form workscreens;​ it is a default setting for the generation ​of such workscreens in VisionX. It is therefore necessary to create separate "​Save"​ and "​Cancel"​ buttons for these workscreens with the respective functionality.+^Parameter ​   ^Description ​                                                       ^Example ​                     ^ 
 +|**Element** ​ |Layout ​                                                            ​|**[Group Panel: Contacts]** ​ | 
 +|**Style** ​   |text, column value, filter value, parameter, concatenation ​of all  |**[colorGreen]** ​            |
  
-Example: ​Manual save and reload+<code java> 
 +Style.addStyleNames(groupPanelContacts,"​colorGreen"​);​ 
 +</​code>​ 
 +==== Allow focus ==== 
 + 
 +Allows setting focus (selection of the element with tab) on an element. 
 + 
 +Hint: Works only in web. 
 + 
 +^Parameter ​   ^Description ​ ^Example ​                          ^ 
 +|**Element** ​ |Layout ​      ​|**[EditorContacts.Firstname]** ​ |
  
 <code java> <code java>
-setManualSaveAndReload(true)+editContactsFirstname.setFocusable(true);
 </​code>​ </​code>​
-==== Report commands ​====+==== Deactivate autoresize columns ​====
  
-=== Show Report ===+Deactivates autoresize for the selected table view.
  
-Shows the specified report. The report is either displayed in a browser or opened using the relevant program (e.g. Word, Excel), depending on how the PC is configured.+^Parameter ​ ^Description ​ ^Example ​                   ^ 
 +|**Table** ​ |table view   ​|**[TableView:​ Contacts]** ​ |
  
-Parameters: ''​%%[List of all reports in the workscreen]%%''​+<code java> 
 +tableContacts.setAutoResize(false);​ 
 +</​code>​ 
 +==== Deactivate responsive design ====
  
-Example: Show Report ​| Form Report Contacts+Deactivates responsive design for the selected element. 
 + 
 +^Parameter ​   ^Description ​ ^Example ​                                         ^ 
 +|**Element** ​ |Layout ​      ​|**[Advanced ​Form Layout: advancedFormLayout1]** ​ |
  
 <code java> <code java>
-getApplication().getLauncher().showFileHandle(getFormReportContacts())+advancedFormLayout1.setResponsive(false);
 </​code>​ </​code>​
-=== Download Report ​===+==== Disable element ====
  
-Downloads ​the specified report. The report ​can be saved on a local hard drive and then opened.+Disables ​the selected element. The element is grayed out and no changes ​can be made. 
 + 
 +^Parameter ​   ^Description ​ ^Example ​                          ^ 
 +|**Element** ​ |Layout ​      ​|**[Editor:​ Contacts.Firstname]** ​ | 
 + 
 +<code java> 
 +editContactsFirstname.setEnabled(false);​ 
 +</​code>​ 
 +==== Disable tab ====
  
-Parameters: ''​%%[List of all reports in the workscreen]%%''​+Disables ​the selected tab in a tabset. It is grayed out and cannot be clicked.
  
-Example: ​Download report ​Form Report Contacts+^Parameter ​  ​^Description ​      ^Example ​                       ^ 
 +|**Tabset** ​ |Layout - Tabsets ​ |**[TabsettabsetPanelMain]** ​ | 
 +|**Tab** ​    ​|Layout - Tabs     |**2. customers** ​              |
  
 <code java> <code java>
-getApplication().getLauncher().saveFileHandle(getFormReportContacts())+tabsetPanelMain.setEnabledAtIfExists(1,false);
 </​code>​ </​code>​
-=== Save Report ​===+==== Disable translation ====
  
-Saves the specified report in a tableThe save location is defined via two parameters: The report'​s file name is saved in a text column of the table; the file itself is saved in the current row of a table column ​of the type Image or File.+Disables ​the translation of an elementThis action works only in the onLoad Event of the Screen.
  
-Parameters: ''​%%[FilenameList of all columns of all databooks in a workscreen],​ [File: List of all columns of all databooks in a workscreen] | [List of all reports in the workscreen]%%''​+^Parameter ​   ^Description ​       ^Example ​                       ^ 
 +|**Element** ​ |Layout - Elements ​ |**[TabsettabsetPanelMain]**  ​|
  
-Example: Save Report | [Contacts.Filename] | [Contacts.Image] | Form Report Contacts+<code java> 
 +tabsetPanelMain.setEnabledAtIfExists(1,​false);​ 
 +</​code>​ 
 +==== Do not allow focus ====
  
-Hint: This command can be used to save the reports generated by the application in a databook ​(e.g.: lists, proposals and other business reports).+Disables ​the translation for the selected element. 
 + 
 +Disallow setting focus (selection of the element with tab) on an element. 
 + 
 +Hint: Works only in web. 
 + 
 +^Parameter ​   ^Description ​ ^Example ​                          ^ 
 +|**Element** ​ |Layout ​      ​|**[EditorContacts.Firstname]** ​ |
  
 <code java> <code java>
-ProjXUtil.storeFileHandle( +editContactsFirstname.setFocusable(false);
-    new Var(rdbContacts,"​FILENAME"​),​ +
-    new Var(rdbContacts,"​IMAGE"​),​ +
-    getFormReportContacts())+
 </​code>​ </​code>​
-=== Import Report (merge) ​===+==== Do not preserve aspect ratio ====
  
-Imports the specified report. All of the report'​s data is imported ​to the relevant rows and fields ​of the workscreenIf "​Merge"​ is selected, only changed, deleted or new information is imported. Data that already exists is not added separately. If "​Insert"​ is used, all data rows, including existing rows (tested for similarityare transferred. This functionality is only available for XLSX (Excel) and XML reports that were created using VisionX. Of course the report templates can be edited. This is command is used to import offline forms into the application.+If an icon has horizontal and/or vertical alignment set to stretch, this action does not keep the original heights ​and width ratio. 
 + 
 +^Parameter ​ ^Description ​        ​^Example ​           ^ 
 +|**Icon** ​  ​|icon ​of the screen ​ |**[Icon: icon1]** ​ | 
 + 
 +<code java> 
 +icon1.setPreserveAspectRatio(false)
 +</​code>​ 
 +==== Enable element ====
  
-Parameters: ''​%%[List of all reports in the workscreen]%%''​+Enables ​the selected element. The element is grayed out and no changes can be made.
  
-Example: Show report ​Form Report2 ​Contacts ​(xls)+^Parameter ​   ^Description ​ ^Example ​                          ^ 
 +|**Element** ​ |Layout ​      ​|**[Editor: ​Contacts.Firstname]** ​ |
  
 <code java> <code java>
-ProjXUtil.importFile(this, "/​reports/​screens/​ContactsWorkScreen$ContactsForm.xls", ​true)+editContactsFirstname.setEnabled(true);
 </​code>​ </​code>​
-=== Import Report (insert) ​===+==== Enable tab ====
  
-See [[#​import_report_(merge)|Import Report (merge)]] above+Enables the selected tab in a tabset. It is not grayed out and can opened. 
 + 
 +^Parameter ​  ​^Description ​      ​^Example ​                       ^ 
 +|**Tabset** ​ |Layout - Tabsets ​ |**[Tabset: tabsetPanelMain]**  | 
 +|**Tab** ​    ​|Layout - Tabs     |**2. customers** ​              |
  
 <code java> <code java>
-ProjXUtil.importFile(this"/​reports/​screens/​ContactsWorkScreen$ContactsForm.xls",​ false)+tabsetPanelMain.setEnabledAtIfExists(1,true);
 </​code>​ </​code>​
-==== File upload/​download commands ​====+==== Enable translation ​====
  
-=== Upload File to ===+Enables the translation of an element. This action works only in the onLoad Event of the Screen.
  
-Uploads a file that is selected by the user and saves it in a databook. The save location is determined by two parameters: The name of the uploaded file is saved in a table'​s text column; the file itself is saved in the current row of a table column of the type Image or File. Parameters: ''​%%[FilenameList of all columns of all databooks in a workscreen]%%''​''​%%[File:​ List of all columns of all databooks in a workscreen]%%''​.+^Parameter ​   ^Description ​       ^Example ​                       ^ 
 +|**Element** ​ |Layout - Elements ​ |**[TabsettabsetPanelMain]**  | 
 + 
 +<code java> 
 +tabsetPanelMain.setEnabledAtIfExists(1,false); 
 +</​code>​ 
 +==== Hide button border ====
  
-Example: Upload file | [Contacts.Filename] | [Contacts.Image]+Hides the border of the selected button.
  
-HintThis command can be used to saved files in a databook. (e.g. emails, proposals and other business reports).+^Parameter ​  ​^Description ​ ^Example ​            ^ 
 +|**Button** ​ |Button ​      ​|**[ButtonSave]** ​ |
  
 <code java> <code java>
-ProjXUtil.uploadFile(this, +buttonButton14.setBorderPainted(false);
-    new Var(rdbContacts,"​FILENAME"​),​ +
-    new Var(rdbContacts,"​IMAGE"​))+
 </​code>​ </​code>​
-=== Show File ===+==== Hide column ====
  
-Shows the specified file. The file is either displayed in a browser or opened using the relevant program (e.g. Word, Excel), depending on how the PC is configured. The file is selected ​via two parameters: the file name and a databook ​column. The file name can be selected via table'​s text column or using fixed text. The data is taken from a column in the currently selected table row (type Image or File).+Hides the selected column ​of Table.
  
-Parameters: ''​%%[Filename: List of all columns of all databooks in a workscreen], [File: List of all columns of all databooks in a workscreen]%%''​+^Parameter ​  ​^Description ​  ​^Example ​                  ^ 
 +|**Column** ​ |Table column ​ |**[Contacts.Firstname]**  |
  
-Example: Show file | [Contacts.Filename] | [Contacts.Image]+<code java> 
 +DataBookUtil.hideColumn(new Var(rdbContacts,"​FIRSTNAME"​));​ 
 +</​code>​ 
 +==== Hide editor border ====
  
-Hint: This command is used to display documents that were saved in the application by the user.+Hides the border of an input field used in the screen. 
 + 
 +^Parameter ​  ​^Description ​            ​^Example ​                          ^ 
 +|**Editor** ​ |editors used in screen ​ |**[Editor: Contacts.Firstname]** ​ |
  
 <code java> <code java>
-ProjXUtil.showFile(this, +editContactsFirstname.setBorderVisible(false);
-    (String)rdbContacts.getValue("​FILENAME"​),​ +
-    rdbContacts.getValue("​IMAGE"​))+
 </​code>​ </​code>​
-=== Download File ===+==== Hide element ====
  
-Downloads ​the specified file. The file can be saved to a local hard drive and opened from there. The file is selected ​via two parameters: the file name and a databook column. The file name can be selected via a table'​s text column or using fixed text. The data is taken from a column ​in the currently selected table row (type Image or File).+Hides the selected ​element used in the screen.
  
-Parameters: ''​%%[Filename:​ List of all columns of all databooks in a workscreen], ​[FileList of all columns of all databooks in a workscreen]%%''​+^Parameter ​   ^Description ​           ^Example ​                          ^ 
 +|**Element** ​ |element ​of the screen ​ |**[EditorContacts.Firstname]**  | 
 + 
 +<code java> 
 +editContactsFirstname.setVisible(false);​ 
 +</​code>​ 
 +==== Hide navigation ====
  
-Example: Download file | [Contacts.Filename] | [Contacts.Image]+Hides the navigation of an editing panel in display mode Tabset or Inline or the table
  
-HintThis command is used to download files that were saved in the application by the user.+^Parameter ​         ^Description ​           ^Example ​                             ^ 
 +|**Editing Panel** ​ |element of the screen ​ |**[Editing PanelmorphPanelMain]** ​ |
  
 <code java> <code java>
-ProjXUtil.downloadFile(this, +morphPanelMain.setTabHeaderVisible(false);
-    (String)rdbContacts.getValue("​FILENAME"​),​ +
-    rdbContacts.getValue("​IMAGE"​))+
 </​code>​ </​code>​
-==== GUI component commands ​====+==== Preserve aspect ratio ====
  
-=== Disable Component ===+If an icon has horizontal and/or vertical alignment set to stretch, this action can keep the original height and width ratio.
  
-Disables ​the specified GUI component. The element is grayed out and no changes can be made.+^Parameter ​ ^Description ​        ​^Example ​           ^ 
 +|**Icon** ​  |icon of the screen ​ |**[Icon: icon1]** ​ |
  
-Parameters: ''​%%[List of all GUI components on the workscreen]%%''​+<code java> 
 +icon1.setPreserveAspectRatio(true);​ 
 +</​code>​ 
 +==== Remove style ====
  
-Example: Disable component ​| [Input field: Contacts.Lastname]+A CSS (Cascading Style Sheets) class can be removed from an element. 
 + 
 +Only styles that were previously added with add style can be removed. 
 + 
 +This action works only in the web. 
 + 
 +^Parameter ​   ^Description ​                                                       ^Example ​                     ^ 
 +|**Element** ​ |Layout ​                                                            |**[Group Panel: Contacts]**  | 
 +|**Style** ​   |text, column value, filter value, parameter, concatenation of all  |**[colorGreen]** ​            |
  
 <code java> <code java>
-edtLastName.setEnabled(false)+Style.removeStyleNames(groupPanelOverview,"​colorGreen"​);
 </​code>​ </​code>​
-=== Enable Component ​===+==== Request focus ====
  
-Enables ​the specified GUI component.+Requests ​the focus (selection of the element with tab) on an element. This works also, if the focus of the element is disabled.
  
-Parameters: ''​%%[List of all GUI components on the workscreen]%%''​+^Parameter ​  ​^Description ​    ​^Example ​                          ^ 
 +|**Editor** ​ |Editor, Search ​ |**[Editor: Contacts.Firstname]**  |
  
-Example: Enable component ​| [Input field: Contacts.Lastname]+<code java> 
 +editContactsFirstname.requestFocus();​ 
 +</​code>​ 
 +==== Save editor immediately ==== 
 + 
 +Normally, changed editor values are only saved in the model when the editor is exited. 
 + 
 +For example, the filter does not search until the editor is exited with enter, tab or mouse click. 
 + 
 +If Save editor immediately is set to an editor or filter, it is saved to the model with each keystroke. The filter searches immediately during the input. 
 + 
 +^Parameter ​  ​^Description ​    ^Example ​                ^ 
 +|**Editor** ​ |Editor, Search ​ |**[Search: Contacts]**  |
  
 <code java> <code java>
-edtLastName.setEnabled(true)+filterContacts.setSavingImmediate(true);
 </​code>​ </​code>​
-=== Hide Component ​===+==== Save editor not immediately ====
  
-Hides the specified GUI component.+Changed editor values are only saved in the model when the editor is exited.
  
-Parameters: ''​%%[List of all GUI components on the workscreen]%%''​+For example, ​the filter does not search until the editor is exited with Enter, Tab or mouse click.
  
-Example: Hide component ​| [Input field: Contacts.Lastname]+^Parameter ​   ^Description ​ ^Example ​                ^ 
 +|**Element** ​ |Layout ​      |**[Search: Contacts]**  |
  
 <code java> <code java>
-edtLastName.setVisible(false)+filterContacts.setSavingImmediate(false);
 </​code>​ </​code>​
-=== Show Component ​===+==== Select tab ====
  
-Shows the specified GUI component.+Activates ​the selected tab.
  
-Parameters: ''​%%[List of all GUI elements on the workscreen]%%''​+^Parameter ​  ​^Description ​                ​^Example ​                       ^ 
 +|**Tabset** ​ |Tabsets in the screen ​      ​|**[Tabset:​ tabsetPanelMain]**  | 
 +|**Tab** ​    ​|Tabsets of selected tabset ​ |**2. Customers** ​              |
  
-Example: Show component ​| [Input field: Contacts.Lastname]+<code java> 
 +tabsetPanelMain.setSelectedIndexIfExists(1);​ 
 +</​code>​ 
 +==== Set background color ==== 
 + 
 +Changes the background color of the selected element. 
 + 
 +^Parameter ​   ^Description ​           ^Example ​                      ^ 
 +|**Element** ​ |Element in the screen ​ |**[Group Panel: Contacts]]**  | 
 +|**Color** ​   |Color Picker ​          ​|**#​FF0000** ​                  |
  
 <code java> <code java>
-edtLastName.setVisible(true)+groupPanelOverview.setBackground(new UIColor(0xff0000));
 </​code>​ </​code>​
-=== Deselect Button ​===+==== Set background image ====
  
-Deselects ​the specified button ​(checkbox, radio- or toggle button).+Changes ​the background image of the selected panel. 
 + 
 +^Parameter ​ ^Description ​           ^Example ​                ^ 
 +|**Panel** ​ |Panels in the screen ​  ​|**[Panel:​ panelMain]** ​ | 
 +|**Image** ​ |Image Upload / Picker ​ |**Background.png** ​     | 
 + 
 +<code java> 
 +panelMain.setBackgroundImage(UIImage.getImage("/​com/​sibvisions/​apps/​vxdemo/​images/​Background.png"​));​ 
 +</​code>​ 
 +==== Set button margins ====
  
-Parameters: ''​%%[List ​of all buttons (checkbox, radio- and toggle) on the workscreen]%%''​+Changes the button margins ​of the selected button.
  
-Example: Deselect button ​| [Input fieldContacts.Lastname]+^Parameter ​   ^Description ​                      ^Example ​                       ^ 
 +|**Button** ​  ​|Buttons in the screen ​            |**[Buttondownload report]**  | 
 +|**Margins** ​ |North, East, South, West margins ​ |**10, 10, 10, 10**             |
  
 <code java> <code java>
-edtLastName.setSelected(false)+buttonShowReport.setMargins(new UIInsets(10,​10,​10,​10));
 </​code>​ </​code>​
-=== Select Button ​===+==== Set display mode ====
  
-Selects ​the specified button (checkbox, radio- or toggle button).+Changes ​the display mode of an editing panel.
  
-Parameters: ''​%%[List of all buttons (checkbox, radio- and toggle) on the workscreen]%%''​+^Parameter ​         ^Description ​    ​^Example ​                             ^ 
 +|**Editing Panel** ​ |editing panels ​ |**[Editing Panel: morphPanelMain]**  | 
 +|**Display Mode** ​  ​|display modes   ​|**Tabset** ​                          |
  
-Example: Select button ​| [Input fieldContacts.Lastname]+<code java> 
 +morphPanelMain.setDisplayMode(DisplayMode.Tabset);​ 
 +</​code>​ 
 +==== Set divider position ==== 
 + 
 +Sets the divider position of a split panel. 
 + 
 +^Parameter ​       ^Description ​    ^Example ​                           ^ 
 +|**Split Panel** ​ |editing panels ​ |**[Split PanelmorphPanelMain]**  | 
 +|**Position** ​    ​|number value    |**350** ​                           |
  
 <code java> <code java>
-edtLastName.setSelected(true)+morphPanelMain.setDividerPosition(350);
 </​code>​ </​code>​
-=== Enable Tab ===+==== Set element editable ====
  
-Activates the specified tab so that it is not grayed out and can be selected.+Enables editing of a table view or trees.
  
-Parameters: ''​%%[ComponentList of all of the workscreen'​s tab controls]%%''​+^Parameter ​   ^Description ​      ​^Example ​                   ^ 
 +|**Element** ​ |table view, tree  |**[TableViewContacts]**  | 
 + 
 +<code java> 
 +tableContacts.setEditable(true);​ 
 +</​code>​ 
 +==== Set element not editable ====
  
-Parameters: ''​%%[Tab:​ List of all tabs of the selected tab control]%%''​+Disables editing ​of a table view or trees.
  
-Example: Enable tab | [TabsetPaneltabsetPanelMain] | Tab 2+^Parameter ​   ^Description ​      ^Example ​                   ^ 
 +|**Element** ​ |table view, tree  ​|**[TableViewContacts]**  ​|
  
 <code java> <code java>
-tabsetPanelMain.setEnabledAtIfExists("Tab 2",​true)+tableContacts.setEditable(false);
 </​code>​ </​code>​
-=== Disable Tab ===+==== Set font ====
  
-Deactivates ​the specified tab. It is grayed out and cannot be selected.+Changes ​the font of an element.
  
-Parameters: ''​%%[ComponentList of all of the workscreen'​s tab controls]%%''​+^Parameter ​   ^Description ​   ^Example ​                     ^ 
 +|**Element** ​ |elements ​      |**[Group PanelContacts]** ​ | 
 +|**Font** ​    ​|list ​of fonts  |**Comic Sans MS**            | 
 +|**Size** ​    ​|number ​        ​|**16** ​                      | 
 +|**Bold** ​    ​|yes/​no ​        ​|**yes** ​                     | 
 +|**Italic** ​  ​|yes/​no ​        ​|**yes** ​                     |
  
-Parameters: ''​%%[Tab:​ List of all tabs of the selected tab control]%%''​+<code java> 
 +groupPanelOverview.setFont(new UIFont("​Comic Sans MS",​3,​16));​ 
 +</​code>​ 
 +==== Set gap between text and image ====
  
-Example: Disable tab | [TabsetPaneltabsetPanelMain] | Tab 2+Changes the gap between the image and the text within a button. 
 + 
 +^Parameter ​  ​^Description ​         ^Example ​            ^ 
 +|**Button** ​ |buttons ​             |**[ButtonSave]**  | 
 +|**Gap** ​    ​|number or parameter ​ |**30** ​             ​|
  
 <code java> <code java>
-tabsetPanelMain.setEnabledAtIfExists("Tab 2",false)+groupPanelOverview.setFont(new UIFont("Comic Sans MS",3,16));
 </​code>​ </​code>​
-=== Select Tab ===+==== Set horizontal alignment ====
  
-Selects ​the specified tab.+Changes ​the alignment of an element text. Left, center and right are possible.
  
-Parameters: ''​%%[ComponentList of all of the workscreen'​s tab controls]%%''​+^Parameter ​     ^Description ​         ^Example ​            ^ 
 +|**Element** ​   |element ​             |**[ButtonSave]**  | 
 +|**Alignment** ​ |left, center, right  |**right** ​          |
  
-Parameters: ''​%%[Tab:​ List of all tabs of the selected tab control]%%''​+<code java> 
 +buttonButton15.setHorizontalAlignment(UIButton.ALIGN_RIGHT);​ 
 +</​code>​ 
 +==== Set horizontal text position ====
  
-Example: Select tab | [TabsetPaneltabsetPanelMain] | Tab 2+Changes the alignment of a button text in relation to the button image. Left, center and right are possible. 
 + 
 +^Parameter ​     ^Description ​         ^Example ​            ^ 
 +|**Button** ​    ​|button ​              |**[ButtonSave]**  | 
 +|**Alignment** ​ |left, center, right  |**right** ​          |
  
 <code java> <code java>
-tabsetPanelMain.setSelectedIndexIfExists("Tab 2")+buttonButton10.setHorizontalTextPosition(UIButton.ALIGN_RIGHT);
 </​code>​ </​code>​
-=== Set Tab Text ===+==== Set image ====
  
-Sets the text of the specified tab.+Changes ​the image of a button.
  
-Parameters: ''​%%[ComponentList of all of the workscreen'​s tab controls]%%''​+^Parameter ​   ^Description ​  ​^Example ​            ^ 
 +|**Element** ​ |button ​       |**[ButtonSave]**  | 
 +|**Image** ​   |Image wizard ​ |**save.png** ​       |
  
-Parameters: ''​%%[Tab:​ List of all tabs of the selected tab control]%%''​+<code java> 
 +buttonButton15.setImage(UIImage.getImage(UIImage.SAVE_SMALL));​ 
 +</​code>​ 
 +==== Set label ====
  
-Example: Set tab text | [TabsetPaneltabsetPanelMain] | Tab 2 Tab 2 New+Changes the text of a label. It's possible to concatenate different values like fixed text and column values. 
 + 
 +^Parameter ​ ^Description ​                                                       ^Example ​                                             ^ 
 +|**Label** ​ |Label ​                                                             |**[LabelHallo]**                                   | 
 +|**Text** ​  ​|text,​ column value, filter value, parameter, concatenation of all  |**Hello, [Contacts.Firstname] [Contacts.Lastname]**  ​|
  
 <code java> <code java>
-tabsetPanelMainsetTextAtIfExists("Tab 2","​Tab 2 New")+labelLabel.setText("Hello, ​" ​+ Text.val(new Var(rdbContacts,"FIRSTNAME")) + " "+ Text.val(new Var(rdbContacts,"​LASTNAME"​)));​
 </​code>​ </​code>​
-=== Set Label with calculated Value ===+Hint: It's possible to use HTML tags within the label.
  
-Calculates the result of the specified formula (see [[#​formulas_in_commands|Formulas in commands]]) and writes it to the specified label (GUI element).+<​code>​ 
 +<​html><​div style="​color:​red;"><​b><​i>​Hello,</​i></​b></​div></​html>​ 
 +</​code>​ 
 +==== Set maximum size ====
  
-Parameters: ''​%%[List of all labels (GUI elements) of the workscreen],​ [Formula including reference to columns in all tables ​of the workscreen]%%''​+Changes ​the maximum height and width of an element.
  
-Example: Set label with calculated value [Contacts.Total] ​[Contacts.Quantity] ​* [Contacts.Price]+^Parameter ​   ^Description ​         ^Example ​            ^ 
 +|**Element** ​ |element ​             ​|**[Button: Save]**  | 
 +|**Width** ​   |number or parameter ​ |**150** ​            | 
 +|**Height** ​  ​|number or parameter ​ |**50** ​             |
  
-Hint: This command can be used for various mathematical operations. The result is then written to a table column. E.g.: calculation of the total price based on quantity and unit price.+<code java> 
 +buttonButton16.setMaximumSize(150,​50);​ 
 +</​code>​ 
 +==== Set minimum size ====
  
-Additional details regarding ​the use of formulas in commands can be found in [[#​formulas_in_commands|Formulas in commands]].+Changes ​the minimum height and width of an element. 
 + 
 +^Parameter ​   ^Description ​         ^Example ​            ^ 
 +|**Element** ​ |element ​             |**[Button: Save]**  | 
 +|**Width** ​   |number or parameter ​ |**150** ​            | 
 +|**Height** ​  ​|number or parameter ​ |**50** ​             |
  
 <code java> <code java>
-Calc.setText(*,*,null) Calc.set(new Var(rdbContacts,"​TOTAL"​),​ +buttonButton16.setMinimumSize(150,50);
-    Calc.val(new Var(rdbContacts,"​QUANTITY"​)) * +
-    Calc.val(new Var(rdbContacts,"​PRICE"​)),​ null)+
 </​code>​ </​code>​
-=== Set Label Text ===+==== Set mouse over image ====
  
-The specified text is written to the specified label (GUI element).+Changes ​the mouse over image of a button.
  
-Parameters: ''​%%[TargetList of all labels ​(GUI-elementsof the workscreen],​ [Text including reference to columns in all tables of the workscreen]%%''​+^Parameter ​  ​^Description ​  ​^Example ​            ^ 
 +|**Button** ​ |button ​       |**[ButtonSave]** ​ | 
 +|**Image** ​  ​|image wizard ​ |**save.png** ​       | 
 + 
 +<code java> 
 +buttonButton16.setMouseOverImage(UIImage.getImage(UIImage.SAVE_LARGE)); 
 +</​code>​ 
 +==== Set navigation mode ====
  
-Example: Set Label Text| [Contacts.Name] | [Contacts.Filename],​ [Contacts.Lastname]+Changes the navigation mode of an editing panel.
  
-Hint: This command can be used to populate text columns with fixed text or values from other columns.+The navigation by single or double click works only if on the first tab is a table placed and on the second the input form. The display mode must be **inline** ​or **popup** and the navigation hidden.
  
-In the example on the rightthe value from "​Lastname",​ the fixed text ", " (comma + space) and the value from "​Firstname"​ is written to the column "​Name":​ "DoeJohn"+^Parameter ​           ^Description ​                      ​^Example ​                             ^ 
 +|**Editing Panel** ​   |editing panel                     ​|**[Editing Panel: morphPanelMain]** ​ | 
 +|**Navigation Mode** ​ |NoneSingle ClickDouble Click  |**Double Click** ​                    |
  
 <code java> <code java>
-lblLastName.setText(+morphPanelMain.setInlineAndPopupNavigationMode(NavigationMode.DoubleClick);
-Text.set(new Var(rdbContacts,"​NAME"​),​ +
-    Text.val(new Var(rdbContacts,"​LASTNAME"​)) + +
-    ", " +  +
-    Text.val(new Var(rdbContacts,"​FIRSTNAME"​)))+
 </​code>​ </​code>​
-==== Additional commands ​====+==== Set placeholder ​====
  
-=== Logout ===+Sets a placeholder text on an element.
  
-The user is logged out.+For example, a date format placeholder text can be displayed in a birthday input field. ​The text is light grey and only displayed, when the editor / element is empty.
  
-Example: ​Logout+^Parameter ​   ^Description ​                                                       ^Example ​                         ^ 
 +|**Element** ​ |element ​                                                           |**[EditorContacts.Birthday]** ​ | 
 +|**Text** ​    ​|text,​ column value, filter value, parameter, concatenation of all  |**DD.MM.YYYY (01.01.1999)** ​     |
  
 <code java> <code java>
-((ProjX)getApplication()).doLogout(null)+editContactsBirthday.setPlaceholder("DD.MM.YYYY ​(01.01.1999)"​);
 </​code>​ </​code>​
-=== Show Error ===+==== Set preferred size ====
  
-Shows a predefined message in an error dialogue.+Changes the preferred height and width of an element.
  
-Parameters: ''​%%[Error message with reference to all databook columns in the workscreen]%%''​+^Parameter ​   ^Description ​         ^Example ​            ^ 
 +|**Element** ​ |element ​             |**[Button: Save]**  | 
 +|**Width** ​   |number or parameter ​ |**150** ​            | 
 +|**Height** ​  ​|number or parameter ​ |**50** ​             |
  
-Example: Show Error | [Input fieldContacts.Lastnameis missing!+<code java> 
 +buttonButton15.setPreferredSize(150,​50);​ 
 +</​code>​ 
 +==== Set pressed image ==== 
 + 
 +Changes the on button click image of a button. 
 + 
 +^Parameter ​  ​^Description ​  ^Example ​            ^ 
 +|**Button** ​ |button ​       |**[ButtonSave]**  | 
 +|**Image** ​  ​|image wizard ​ |**save.png** ​       |
  
 <code java> <code java>
-showError(this,  +buttonButton16.setPressedImage(UIImage.getImage(UIImage.SAVE_LARGE));
-    Text.val(new Var(rdbContacts,"​LASTNAME"​)+
-    " is missing!"​)+
 </​code>​ </​code>​
-=== Show Information ​===+==== Set tab image ====
  
-Shows a predefined message in an information dialogue.+Changes the image of the selected tab. 
 + 
 +^Parameter ​  ​^Description ​            ​^Example ​                       ^ 
 +|**Tabset** ​ |Tabset ​                 |**[Tabset: tabsetPanelMain]** ​ | 
 +|**Tabset** ​ |Tab of selected Tabset ​ |**2. customers** ​              | 
 +|**Image** ​  ​|image wizard ​           |**about.png** ​                 | 
 + 
 +<code java> 
 +tabsetPanelMain.setIconAtIfExists(1,​UIImage.getImage(UIImage.ABOUT_SMALL));​ 
 +</​code>​ 
 +==== Set tab text ====
  
-Parameters: ''​%%[Information message with reference to all databook columns in the workscreen]%%''​+Changes ​the text of the selected tab.
  
-Example: Show information ​| [Input fieldContacts.Lastnameis missing!+^Parameter ​  ​^Description ​                                                       ^Example ​                       ^ 
 +|**Tabset** ​ |Tabset ​                                                            |**[TabsettabsetPanelMain]** ​ | 
 +|**Tabset** ​ |Tab of selected Tabset ​                                            |**2customers** ​              | 
 +|**Text** ​   |text, column value, filter value, parameter, concatenation of all  |**[Customers.company name]**   |
  
 <code java> <code java>
-showInformation(this, +tabsetPanelMain.setTextAtIfExists(1,​Text.val(new Var(rdbCustomers,"COMPANY_NAME")));
-    ​Text.val(new Var(rdbContacts,"LASTNAME"​)) ​+
-    " is missing!"​)+
 </​code>​ </​code>​
-=== Validation Error ===+==== Set text color ====
  
-Shows a validation error. The specified text is shown on the workscreen in a validation error message.+Changes ​the text color of an element.
  
-Parameters: ''​%%[Validation error message with reference to all databook columns in the workscreen]%%''​+^Parameter ​   ^Description ​   ^Example ​            ^ 
 +|**Element** ​ |element ​       |**[Button: Save]**  | 
 +|**Color** ​   |Color chooser ​ |**#​FF0000** ​        |
  
-Example: Validation error | [Input field: Contacts.Street] is a required field.+<code java> 
 +buttonButton15.setForeground(new UIColor(0xff0000));​ 
 +</​code>​ 
 +==== Set tooltip ====
  
-Hint:​Validation errors are always used for the GUI element ​"field validation." If email is empty, then validation error "..."!+Changes ​the tooltip text of an element. ​The tooltip ​is displayed when the mouse is positioned over the selected element. 
 + 
 +^Parameter ​   ^Description ​                                                       ^Example ​                            ^ 
 +|**Element** ​ |element ​                                                           |**[Button: Save]** ​                 | 
 +|**Text** ​    ​|text,​ column value, filter value, parameter, concatenation of all  |**This button saves all changes.**  |
  
 <code java> <code java>
-throw new Exception( +buttonButton15.setToolTipText("This button saves all changes.");
-    Text.val(new Var(rdbContacts,"​STREET"​)) + +
-    ​" ​is a required field.")+
 </​code>​ </​code>​
-=== Send Mail ===+==== Set vertical alignment ====
  
-Sends an email messageThe parameters can reference databook columns or can be defined using fixed text.+Changes the vertical alignment of a selected element. 
 + 
 +^Parameter ​     ^Description ​         ^Example ​            ^ 
 +|**Element** ​   |element ​             |**[Button: Save]** ​ | 
 +|**Alignment** ​ |top, middle, bottom ​ |**top** ​            | 
 + 
 +<code java> 
 +buttonButton15.setVerticalAlignment(UIButton.ALIGN_TOP);​ 
 +</​code>​ 
 +==== Set vertical text position ====
  
-Parameters: ''​%%[STMP Server], [STMP Port], [SMTP User], [SMTP Password], [Sender], [Recipient],​ [Subject], [Mail Text], [Filename], [File]%%''​+Changes the vertical text position of a button in relation to the button image.
  
-HintIt is good practice to create one or more tables containing the various parametersto allow for easier configuration.+^Parameter ​    ​^Description ​         ^Example ​            ^ 
 +|**Button** ​   |button ​              ​|**[ButtonSave]** ​ | 
 +|**Position** ​ |topmiddle, bottom ​ |**top** ​            |
  
 <code java> <code java>
-getConnection().callAction("​sendMail",​ +buttonButton15.setVerticalTextPosition(UIButton.ALIGN_TOP);
-    (String)rdbEmailserver.getValue("​SMTPSERVER"​),​ +
-    (String)rdbEmailserver.getValue("​SMTPPORT"​),​ +
-    (String)rdbEmailserver.getValue("​USERNAME"​),​ +
-    (String)rdbEmailserver.getValue("​PASSWORD"​),​ +
-    (String)rdbEmailserver.getValue("​SENDER"​),​ +
-    (String)rdbUsers.getValue("​RECIPIENT"​),​ +
-    "​E-Mail subject",​ +
-    "​Test\nhttp://​sibvisioons.com",​ +
-    "",​ +
-    ""​)+
 </​code>​ </​code>​
-====== Conditions ======+==== Show button border ​====
  
-Conditions allow for the execution ​of commands in dependence on whether ​the condition is met or not. One set of commands can be executed if the condition is met, and another if the condition is not met.+Shows the border ​of the selected button.
  
-This results in varying outcomes depending on the condition, e.g.if the user has the role "​Administrator",​ all databook columns are visible, otherwise only a selected number of columns is shown.+^Parameter ​  ​^Description ​ ^Example ​            ^ 
 +|**Button** ​ |Button ​      ​|**[ButtonSave]** ​ |
  
-Example:+<code java> 
 +buttonButton14.setBorderPainted(false);​ 
 +</​code>​ 
 +==== Show button border if mouse is not over ==== 
 + 
 +Shows the border of the selected button if the mouse cursor is not pointing over the button. 
 + 
 +^Parameter ​  ​^Description ​ ^Example ​            ^ 
 +|**Button** ​ |Button ​      ​|**[ButtonSave]** ​ | 
 + 
 +<code java> 
 +buttonButton15.setBorderOnMouseEntered(false);​ 
 +</​code>​ 
 +==== Show button border if mouse is over ==== 
 + 
 +Shows the border of the selected button if the mouse cursor points over the button. 
 + 
 +^Parameter ​  ​^Description ​ ^Example ​            ^ 
 +|**Button** ​ |Button ​      ​|**[Button:​ Save]** ​ | 
 + 
 +<code java> 
 +buttonButton15.setBorderOnMouseEntered(true);​ 
 +</​code>​ 
 +==== Show column ==== 
 + 
 +Shows the selected column of a Table. The column will be placed at the end of all displayed columns. 
 + 
 +^Parameter ​  ​^Description ​  ​^Example ​                  ^ 
 +|**Column** ​ |Table column ​ |**[Contacts.Firstname]** ​ | 
 + 
 +<code java> 
 +DataBookUtil.showColumn(new Var(rdbContacts,"​FIRSTNAME"​));​ 
 +</​code>​ 
 +==== Show editor border ==== 
 + 
 +Shows the border of an input field used in the screen. 
 + 
 +^Parameter ​  ​^Description ​            ​^Example ​                          ^ 
 +|**Editor** ​ |editors used in screen ​ |**[Editor: Contacts.Firstname]** ​ | 
 + 
 +<code java> 
 +editContactsFirstname.setBorderVisible(false);​ 
 +</​code>​ 
 +==== Show element ==== 
 + 
 +Shows the selected element used in the screen. 
 + 
 +^Parameter ​   ^Description ​           ^Example ​                          ^ 
 +|**Element** ​ |element of the screen ​ |**[Editor: Contacts.Firstname]** ​ | 
 + 
 +<code java> 
 +editContactsFirstname.setVisible(true);​ 
 +</​code>​ 
 +==== Show navigation ==== 
 + 
 +Shows the navigation of an editing panel in display mode Tabset or Inline. 
 + 
 +^Parameter ​         ^Description ​           ^Example ​                             ^ 
 +|**Editing Panel** ​ |element of the screen ​ |**[Editing Panel: morphPanelMain]** ​ | 
 + 
 +<code java> 
 +morphPanelMain.setTabHeaderVisible(true);​ 
 +</​code>​ 
 +==== Start editing ==== 
 + 
 +Starts editing in the selected row and column of a table view. 
 + 
 +^Parameter ​   ^Description ​ ^Example ​                   ^ 
 +|**Element** ​ |table views  |**[TableView:​ Contacts]** ​ | 
 + 
 +<code java> 
 +tableContacts.startEditing();​ 
 +</​code>​ 
 +==== Toggle button down ==== 
 + 
 +The selected toggle button (checkbox, radio- or toggle button) is pressed. 
 + 
 +^Parameter ​  ​^Description ​                           ^Example ​                    ^ 
 +|**Button** ​ |checkbox, radio button, toggle button ​ |**[Check Box: Check Box]** ​ | 
 + 
 +<code java> 
 +checkBoxCheckBox.setSelected(true);​ 
 +</​code>​ 
 +==== Toggle button up ==== 
 + 
 +The selected toggle button (checkbox, radio- or toggle button) is unpressed. 
 + 
 +^Parameter ​  ​^Description ​                           ^Example ​                    ^ 
 +|**Button** ​ |checkbox, radio button, toggle button ​ |**[Check Box: Check Box]** ​ | 
 + 
 +<code java> 
 +checkBoxCheckBox.setSelected(false);​ 
 +</​code>​ 
 +==== Trigger validation error ==== 
 + 
 +Shows a validation error. The defined error message is shown in a Validation Result area. 
 + 
 +Hint: Only triggered within a validator will display it in the Validation Result. If this action is placed on a button, it will be displayed in a message dialog. 
 + 
 +^Parameter ​   ^Description ​                                                       ^Example ​                                       ^ 
 +|**Message** ​ |text, column value, filter value, parameter, concatenation of all  |**The email [Customers.email] is not valid.** ​ | 
 + 
 +<code java> 
 +throw new Exception("​The email " + Text.val(new Var(rdbCustomers,"​EMAIL"​)) + " is not valid."​);​ 
 +</​code>​ 
 +===== Work screen ===== 
 + 
 +==== Center this screen ==== 
 + 
 +Centers the current screen (horizontally and vertically). It only works, if the screen is not maximized. 
 + 
 +<code java> 
 +center(); 
 +</​code>​ 
 +==== Close screen ==== 
 + 
 +Closes the selected screen. 
 + 
 +^Parameter ​  ​^Description ​     ^Example ​      ^ 
 +|**Screen** ​ |List of screens ​ |**Contacts** ​ | 
 + 
 +<code java> 
 +((ProjX)getApplication()).close("​com.sibvisions.apps.vxdemo.screens.ContactsWorkScreen"​);​ 
 +</​code>​ 
 +==== Close this screen ==== 
 + 
 +Closes the current screen. 
 + 
 +<code java> 
 +close(); 
 +</​code>​ 
 +==== Disable manual save and reload ==== 
 + 
 +Changes are saved automatically. 
 + 
 +Hint: The current screen is attached to the application toolbar. Clicking "​Save"​ or "​Reload"​ on the toolbar is working within the current screen. 
 + 
 +<code java> 
 +setManualSaveAndReload(false);​ 
 +</​code>​ 
 +==== Discard all changes ==== 
 + 
 +Discards all changes on a screen, without reloading the data. 
 + 
 +Hint: This command is used to discard changes on a form using a "​Cancel"​ button. 
 + 
 +<code java> 
 +getDataSource().restoreAllDataBooks();​ 
 +</​code>​ 
 +==== Enable manual save and reload ==== 
 + 
 +No changes are saved automatically. To save or undo changes, there are the following actions: 
 + 
 +  * Save all changes 
 +  * Save table 
 +  * Reload all 
 +  * Reload all screens 
 +  * Reload table 
 +  * Discard all changes 
 + 
 +Hint: The current screen is detached from the application toolbar. Clicking "​Save"​ or "​Reload"​ on the toolbar is ignored within the current screen. 
 + 
 +<code java> 
 +setManualSaveAndReload(true);​ 
 +</​code>​ 
 +==== Open Screen ==== 
 + 
 +Opens the selected workscreen. 
 + 
 +^Parameter ​  ​^Description ​     ^Example ​      ^ 
 +|**Screen** ​ |List of screens ​ |**Contacts** ​ | 
 + 
 +<code java> 
 +((ProjX)getApplication()).openWorkScreen("​com.sibvisions.apps.vxdemo.screens.ContactsWorkScreen"​);​ 
 +</​code>​ 
 +==== Reload all ==== 
 + 
 +Discards all changes and reloads records of the current screen from the database. 
 + 
 +<code java> 
 +getDataSource().reloadAllDataBooks();​ 
 +</​code>​ 
 +==== Save all changes ==== 
 + 
 +Saves all changes of the current screen. 
 + 
 +<code java> 
 +getDataSource().saveAllDataBooks();​ 
 +</​code>​ 
 +==== Set Parameter ==== 
 + 
 +Sets a parameter with a static value. 
 + 
 +^Parameter ​ ^Description ​                                 ^Example ​ ^ 
 +|**Name** ​  |text value                                   ​|VALUE ​   | 
 +|**Value** ​ |text, column value, filter value, parameter ​ |         | 
 + 
 +<code java> 
 +setParameter("​VALUE","​100"​);​ 
 +</​code>​ 
 +==== Set Parameter with calculated value ==== 
 + 
 +Sets a parameter with a calculated value. For more information see [[#​formulas|Formulas]] 
 + 
 +^Parameter ​   ^Description ​                                 ^Example ​                                             ^ 
 +|**Name** ​    |text value                                   ​|VALUE ​                                               | 
 +|**Fromula** ​ |text, column value, filter value, parameter ​ |[Order Details.Quantity]*[Order Details.Unit Price] ​ | 
 + 
 +<code java> 
 +Calc.setParameter(this,"​VALUE",​Calc.val(new Var(rdbOrderdetails,"​QUANTITY"​)) * Calc.val(new Var(rdbOrderdetails,"​UNIT_PRICE"​)));​ 
 +</​code>​ 
 +==== Set Parameter with concatenated text ==== 
 + 
 +^Parameter ​ ^Description ​                                                       ^Example ​ ^ 
 +|**Name** ​  |text value                                                         ​|VALUE ​   | 
 +|**Text** ​  ​|text,​ column value, filter value, parameter, concatenation of all  |         | 
 + 
 +<code java> 
 +Text.setParameter(this,"​VALUE",​Text.val(new Var(rdbContacts,"​FIRSTNAME"​)) + " " + Text.val(new Var(rdbContacts,"​LASTNAME"​)));​ 
 +</​code>​ 
 +====== List of conditions ======
  
-{{:​visionx:​actions:​if.png?​nolink|The example of an If cascade.}}+===== Conditions =====
  
-  - If the column "​Userdata.Created" ​is empty, execute the following commands +If an action ​is to be executed only in certain cases, then conditions are requiredAlways 2 values are compared by means of a given conditionIf this condition is fulfilledone or more actions are executed, if this condition is not fulfilled, another action can be executedConditions are nestable.
-    - Write the current date to "​Userdata.Createdon"​ +
-    - Write the current user to "​Userdata.Createdby"​ +
-  - Otherwiseexecute the following commands +
-    - Write the current user to "​Userdata.Changedby"​ +
-    - Write the current date to "​Userdata.Changedon"​+
  
-===== If Equals / If not Equals / If Greater / If Greater Or Equal / If Smaller / If Smaller Or Equal =====+==== Are equal ====
  
-If the first parameter equals / does not equal / is greater than / is greater than or equals / is smaller than / is smaller than or equals the second parameter, then the commands in the "​If"​ path are executed, otherwise the commands in the "​Else"​ path are executed.+Compares two values if they are equal.
  
-Parameters: ''​%%[List of all columns of all databooks in the workscreenor a set value][List of all columns of all databooks in the workscreenor a set value]%%''​+^Parameter ​   ^Description ​                                 ^Example ​      ^ 
 +|**Value 1**  |textcolumn ​value, ​filter valueparameter ​ |**Contacts** ​ | 
 +|**Value 2**  |text, column ​value, filter value, parameter ​ |**Contacts** ​ |
  
 <code java> <code java>
-if (Logical.equals(rdbUserdata.getValue("​CREATEDON"​),""​)) +if (Logical.equals(rdbContacts.getValue("​TOWN"​),"​Vienna")) { 
-+  ​showInformation(this,​"Yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"No");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== If Between / If Not Between =====+==== Are not equal ====
  
-If the first parameter is greater than or equal to the second parameter and the first parameter is also smaller than or equal to the third parameter, then the commands in the "​If"​ path are executed, otherwise the commands in the "​Else"​ path are executed. "​If ​not between"​ results in the opposite.+Compares two values if they are not equal.
  
-Parameters: ''​%%[List of all columns of all tables of the workscreen or a constant ​value][List of all columns of all tables of the workscreen or a constant ​value]%%''​+^Parameter ​   ^Description ​                                 ^Example ​      ^ 
 +|**Value 1**  |text, column ​value, ​filter ​value, parameter ​ |**Contacts** ​ | 
 +|**Value 2**  |text, column value, filter value, parameter ​ |**Contacts** ​ |
  
-Hint: This command is often used to check a date field against ​specified date range, ​or to check a number field against a specified range of values.+<code java> 
 +if (!Logical.equals(rdbContacts.getValue("​TOWN"​),"​Vienna"​)) { 
 +  showInformation(this,"​Yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​No"​);​ 
 +
 +</​code>​ 
 +==== Are validations in area ok ==== 
 + 
 +It's possible ​to check all validators of grouping element or validator directly When all validators ​or the selected are correct, the actions in the "​If"​ path are executed, otherwise the actions in the "​Else"​ path are executed. 
 + 
 +Hint: It is also possible ​to check nested elements here. For example, if panel is selected, all validators on the panel and on all panels that have been placed on this panel are checked. 
 + 
 +^Parameter ​   ^Description ​                   ^Example ​                     ^ 
 +|**Element** ​ |grouping elements, validators ​ |**[Group Panel: Contacts]** ​ |
  
 <code java> <code java>
-if (Logical.between(rdbUserdata.getValue("​PRICE"​),100, 1000)+if (validationResult2.isValid()) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== If a row is selected =====+==== Are validations ok ====
  
-If a row is selected in the specified table, then the commands ​in the "​If"​ path are executed, otherwise the commands ​in the "​Else"​ path are executed.+If all validation elements on the same grouping element as the result element are correct, then the actions ​in the "​If"​ path are executed, otherwise the actions ​in the "​Else"​ path are executed.
  
-Parameters''​%%[List of all tables of the workscreen]%%''​+HintThis condition is often used to perform and show all field validations. If validation errors occur during ​the field validations,​ they are displayed collectively in the selected validation result. 
 + 
 +^Parameter ​   ^Description ​        ​^Example ​                                    ^ 
 +|**Element** ​ |Validation results ​ |**[Validation Result: validationResult2]**  |
  
 <code java> <code java>
-if (Logical.equals(rdbUserdata.getValue("​CREATEDON"​),""​)) { +if (validationResult2.isValid()) { 
-    // ​"If" ​- Path+  ​showInformation(this,​"yes");
 } }
-else +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Has Role / Not has Role =====+==== Has record ​====
  
-If the current user has the specified role, then the commands in the "​If"​ path are executed, otherwise the commands in the "​Else"​ path are executed.+Checks if a table has at least one record.
  
-Parameters''​%%[List of all roles in the application]%%''​+HintIf a filter is used in the screen, you may reset or if needed set the filter to check if there are any records. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​               ^ 
 +|**Table** ​ |tables ​      ​|**[Table:​ Contacts]**  | 
 + 
 +<code java> 
 +if (DataBookUtil.hasRecords(rdbContacts)) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Has role assigned ====
  
-Hint: This command can be used to restrict access to information according ​to user rolesRole restriction at the data level!+This condition is true if the selected role has been assigned ​to the user.
  
-  * Administrator ​is able to see everything, no filter +^Parameter ​ ^Description ​ ^Example ​           ^ 
-  ​Staff member can only see their own datasets, filtered by username+|**Role** ​  ​|roles ​       |**Administrator**  |
  
 <code java> <code java>
-if (getApplication().hasRole("​Administrator"​)) +if (getApplication().hasRole("​Administrator"​)) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Enabled =====+==== Is Desktop environment ​====
  
-If the specified GUI element ​is active (see command "​Enable Component"​),​ then the commands in the "​If"​ path are executed, otherwise the commands ​in the "​Else"​ path are executed.+This condition is true when the application ​is executed in a desktop environment.
  
-Parameters: ''​%%[List of all GUI elements of the workscreen]%%''​+<code java> 
 +if (getApplication().getLauncher().isDesktopEnvironment()) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is Html5 environment ==== 
 + 
 +This condition is true when the application is executed in a Html5 environment.
  
 <code java> <code java>
-if (edtLastName.isEnabled()) +if (getApplication().getLauncher().isDesktopEnvironment()) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Visible =====+==== Is Mobile environment ​====
  
-If the specified GUI element ​is visible ​(see command "Show Component"​), then the commands in the "If" ​path are executedotherwise the commands in the "Else" ​path are executed.+This condition is true when the application ​is executed in a mobile environment. 
 + 
 +<code java> 
 +if (getApplication().getLauncher().isMobileEnvironment()) { 
 +  showInformation(this,"yes"); 
 +
 +else { 
 +  showInformation(this,"no"); 
 +
 +</​code>​ 
 +==== Is REST environment ====
  
-Parameters: ''​%%[List of all GUI elements of the workscreen]%%''​+This condition is true when the application is executed in a REST environment.
  
 <code java> <code java>
-if (edtLastName.isVisible())  +if (getApplication().getLauncher().isRESTEnvironment()) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Button Selected =====+==== Is Service environment ​====
  
-If the specified button ​is selected ​(checked) (see command ​"show element"​), ​then the commands ​in the "If" ​path are executedotherwise the commands in the "Else" ​path are executed.+This condition is true when the application ​is executed in a service environment. 
 + 
 +<code java> 
 +if ("​APPSERVICES"​.equals(getApplication().getLauncher().getEnvironmentName())) { 
 +  showInformation(this,​"yes")
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is Test environment ==== 
 + 
 +This condition is true when the application is executed ​in a test environment. 
 + 
 +<code java> 
 +if (getApplication().getLauncher().isHeadlessEnvironment()) { 
 +  showInformation(this,​"yes"); 
 +
 +else { 
 +  showInformation(this,"no"); 
 +
 +</​code>​ 
 +==== Is between ==== 
 + 
 +This condition is true when the selected value is between minimum and maximum value.
  
-Parameters: ''​%%[List of all GUI elements of the workscreen]%%''​+^Parameter ​         ^Description ​                                 ^Example ​                 ^ 
 +|**value** ​         |text, column value, filter value, parameter ​ |**[Contacts.Birthday]**  | 
 +|**minimum value** ​ |text, column value, filter value, parameter ​ |**01.01.1990** ​          | 
 +|**maximum value** ​ |text, column value, filter value, parameter ​ |**31.12.2022** ​          |
  
 <code java> <code java>
-if (edtLastName.isSelected()) +if (Logical.between(rdbContacts.getValue("​BIRTHDAY"​),"​01.01.1990","​31.12.2022"​)) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Tab Selected =====+==== Is column changed ​====
  
-If the specified tab is selected (see command "​Select Tab "), then the commands ​in the "​If"​ path are executed, otherwise the commands ​in the "​Else"​ path are executed.+If the selected column ​is changed the condition is true and the actions ​in the "​If"​ path are executed, otherwise the actions ​in the "​Else"​ path are executed.
  
-Parameters''​%%[Element:​ List of all tab controls of the workscreen]%%''​+HintThis condition works only with **Row value changed** and **Update** events.
  
-Parameters: ''​%%[Tab: List of all tabs of the previously selected tab control]%%''​+^Parameter ​  ​^Description ​ ^Example ​                  ^ 
 +|**Column** ​ |column ​      |**[Contacts.Firstname]**  |
  
 <code java> <code java>
-if (tabsetPanelMain.getSelectedIndex() == "Tab 2") +if (DataBookUtil.isChangedColumnName(pEvent,new Var(rdbContacts,​"FIRSTNAME"))) 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Column Changed =====+==== Is e-mail invalid ​====
  
-If the columns ​is changed ​(value changed) then the commands ​in the "​If"​ path are executed, otherwise the commands ​in the "​Else"​ path are executed.+If the first parameter ​is an invalid email address ​(W3C consortium definition)then the actions ​in the "​If"​ path are executed, otherwise the actions ​in the "​Else"​ path are executed.
  
-Parameters: ''​%%[List of all table columns in a workscreen]%%''​+^Parameter ​ ^Description ​                                 ^Example ​              ^ 
 +|**Text** ​  ​|text,​ column value, filter value, parameter ​ |**[Contacts.Email]**  |
  
 <code java> <code java>
-if (DataBookUtil.isChangedColumnName(pEvent,"LASTNAME")) +if (!Logical.isValidEmail((String)rdbContacts.getValue("EMAIL"))
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Are Validations Ok =====+==== Is enabled ​====
  
-If all field validations on the same panel (GUI Element) of the validation result ​element ​are correct, then the commands ​in the "If" path are executed, otherwise the commands in the "Else" path are executed.+If the selected ​element ​is enabled ​the condition is true and the actions ​in the "​If"​ path are executed.
  
-Parameters: ''​%%[List of all validation results]%%''​+^Parameter ​   ^Description ​ ^Example ​                          ^ 
 +|**Element** ​ |element ​     |**[Editor: Contacts.Firstname]**  |
  
-Hint: This condition is often used to perform and show all field validationsIf validation errors ​(see command ​"Validation Error"​) ​occur during the field validationsthey are collectively shown in the specified validation result element.+<code java> 
 +if (editContactsFirstname.isEnabled()) { 
 +  showInformation(this,​"yes")
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is first record selected ====
  
-What does "​on ​the same panel "mean?+If the first record of the selected table is selected the condition is true and the actions in the "If" ​path are executed.
  
-"​Panel"​ means a GUI element that is merely a drawing area containing fields, labels, etc. VisionX performs all field validations that are on the same panel as the validation result.+^Parameter ​ ^Description ​ ^Example ​               ^ 
 +|**Table** ​ |table ​       |**[Table: Contacts]** ​ |
  
 <code java> <code java>
-if (validationResult.isValid()) +if (DataBookUtil.isFirstRowSelected(rdbContacts)) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Invalid Email =====+==== Is greater ​====
  
-If the first parameter ​is an invalid email address (W3C consortium definition),​ then the commands in the "​If"​ path are executed, otherwise ​the commands ​in the "Else" path are executed.+If the selected value is greater than the limit the condition is true and the actions ​in the "If" path are executed.
  
-Parameters: ''​%%[List of all columns of all tables in the workscreen or a fixed value]%%''​+^Parameter ​ ^Description ​                                 ^Example ​                 ^ 
 +|**Value** ​ |text, column ​value, filter value, parameter ​ |**[Contacts.Birthday]**  | 
 +|**Limit** ​ |text, column value, filter value, parameter ​ |**01.01.1990** ​          |
  
 <code java> <code java>
-if (Logical.equals(rdbUserdata.getValue("​CREATEDON"​),""​)) +if (Logical.greater(rdbContacts.getValue("​BIRTHDAY"​),"​01.01.1990")) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Showing =====+==== Is greater or equal ====
  
-This condition is true if the workscreen is showing ​and the operations ​"open" ​and "​load"​ have been completedThe condition can be used for a events such as "After Row selected"​ to determine if the event occurred during initialization or if it was triggered by the user.+If the selected value is greater or equal than the limit the condition is true and the actions in the "If" ​path are executed. 
 + 
 +^Parameter ​ ^Description ​                                 ^Example ​                 ^ 
 +|**Value** ​ |text, column value, filter value, parameter ​ |**[Contacts.Birthday]** ​ | 
 +|**Limit** ​ |text, column value, filter value, parameter ​ |**01.01.1990** ​          |
  
 <code java> <code java>
-if (isShowing()) +if (Logical.greaterOrEqual(rdbContacts.getValue("​BIRTHDAY"​),"​01.01.1990"​)) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Importing =====+==== Is importing ​====
  
 This condition is true if the "​import"​ action is currently executed. The condition can be used for events such as "After row selected"​ to determine if the event occurred during initialization or if it was triggered by the user. This condition is true if the "​import"​ action is currently executed. The condition can be used for events such as "After row selected"​ to determine if the event occurred during initialization or if it was triggered by the user.
  
 <code java> <code java>
-if (ProjXUtil.isImporting()) +if (ProjXUtil.isImporting()) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Mobile Environment =====+==== Is last record selected ​====
  
-This condition is true when the application is executed ​in a mobile environment.+If the last record of the selected table is selected the condition is true and the actions ​in the "​If"​ path are executed. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​               ^ 
 +|**Table** ​ |table ​       |**[Table: Contacts]** ​ |
  
 <code java> <code java>
-if (getApplication().getLauncher().isMobileEnvironment()+if (DataBookUtil.isLastRowSelected(rdbContacts,​false)) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Desktop Environment =====+==== Is longer ​====
  
-This condition is true when the application is executed ​in a desktop environment.+If the value length is greater than the selected length the condition is true and the actions ​in the "​If"​ path are executed. 
 + 
 +^Parameter ​  ​^Description ​      ​^Example ​                 ^ 
 +|**Value** ​  ​|column ​           |**[Contacts.Birthday]** ​ | 
 +|**Length** ​ |value, parameter ​ |**10** ​                  |
  
 <code java> <code java>
-if (getApplication().getLauncher().isDesktopEnvironment())  +if (Text.isLonger(new Var(rdbContacts,"​FIRSTNAME"​),​10)) { 
-{  +  ​showInformation(this,​"yes"); 
-    // ​"If" ​- Path  +
-}  +else { 
-else  +  ​showInformation(this,​"no");
-{  +
-    // ​"Else" ​- Path +
 } }
 </​code>​ </​code>​
 +==== Is not between ====
  
-===== Is Html5 Environment =====+This condition is true when the selected value is not between minimum and maximum value.
  
-This condition is true when the application is executed in a Html5 environment.+^Parameter ​         ^Description ​                                 ^Example ​                 ^ 
 +|**value** ​         |text, column value, filter value, parameter ​ |**[Contacts.Birthday]** ​ | 
 +|**minimum value** ​ |text, column value, filter value, parameter ​ |**01.01.1990** ​          | 
 +|**maximum value** ​ |text, column value, filter value, parameter ​ |**01.01.2000** ​          |
  
 <code java> <code java>
-if (getApplication().getLauncher().isWebEnvironment()) +if (!Logical.between(rdbContacts.getValue("​BIRTHDAY"​),"01.01.1990","​01.01.2000"​)) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-===== Is Service Environment =====+==== Is pressed or checked ​====
  
-This condition is true when the application is executed in service environment.+This condition is true when a toggle button is pressed or checkbox/​radio button is checked. 
 + 
 +^Parameter ​  ​^Description ​                           ^Example ​                    ^ 
 +|**Button** ​ |checkbox, radio button, toggle button ​ |**[Check Box: Check Box]** ​ |
  
 <code java> <code java>
-if ("​APPSERVICES"​.equals(getApplication().getLauncher().getEnvironmentName())) +if (checkBoxCheckBox1.isSelected()) { 
-+  ​showInformation(this,​"yes");
-    // ​"If" ​- Path+
 } }
-else  +else { 
-+  ​showInformation(this,​"no");
-    // ​"Else" ​- Path+
 } }
 </​code>​ </​code>​
-====== Loop ======+==== Is record selected ​====
  
-Loops are used to execute commands multiple times for the datasets ​of table/view.+If any record ​of the selected ​table is selected the condition is true and the actions in the "​If"​ path are executed.
  
-===== Example: ​Create sum =====+^Parameter ​ ^Description ​ ^Example ​               ^ 
 +|**Table** ​ |table ​       |**[TableContacts]** ​ |
  
-A typical application of a repetition is the generation of the sum from a number of individual values. The individual values ​(e.g. table "Items"​) ​are saved in a detail tablewhich is used as the parameter for the repetition.+<code java> 
 +if (rdbContacts.getSelectedRow() >= 0) { 
 +  showInformation(this,​"yes")
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is row selected ====
  
-{{:visionx:actions:​sum-1.png?​nolink|The example of creating a sum.}}+If a certain row of the selected table is selected the condition is true and the actions ​in the "​If"​ path are executed.
  
-  - The column "​Bill.Total"​ is set to 0. +Hint: The row numbers start at and not at 1For example, the row numbered 2 is the 3rd row in the table.
-  - The following command ​is executed for all rows of the table "​Items":​ +
-    - Calculate ''​%%[Bill.Total] + [Items.Price]%%''​ and write the resulting value to "​[Bill.Total]"​.+
  
-All prices are added and the total is saved in the "​Bill.Total"​ column+^Parameter ​      ​^Description ​       ^Example ​               ^ 
 +|**Table** ​      ​|table ​             |**[Table: Contacts]** ​ | 
 +|**Row number** ​ |number, parameter ​ |**0** ​                 |
  
-===== Example: Keeping sub-totals current ​=====+<code java> 
 +if (rdbContacts.getSelectedRow() ​== 0) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is screen showing ​====
  
-Another common example ​is the generation of sub-totals after each individual entry. In the example below, the table "​To-dos"​ contains a column "​Value1"​ (e.g. for expenses). For each To-do row we would like to know the amount of expenses that have accumulated up to and including the current To-do item.+The condition ​is true when the current screen is displayed ​and not closed.
  
-The values in the "Value1" ​column are added from the first row to the currently selected row using the sumToCurrent([Todos.Value1]group function. This function returns the sub-total of expenses in each To-do row.+<code java> 
 +if (isShowing()) { 
 +  showInformation(this,​"yes"); 
 +
 +else { 
 +  showInformation(this,"​no"​)
 +
 +</​code>​ 
 +==== Is selected ​row greater ====
  
-If the expenses for an individual To-do item ("​Value1"​ column) are changed, all sub-totals in all rows have to be recalculated. This calculation can be performed using a repetition involving all rows in the To-dos ​table. It is good practice to add this action as a "value change"​ event in the "​To-dos"​ table. In addition, ​the currently selected row in the "Todos" ​table should be saved, and restored after the operation is completed.+If the current row of the selected ​table is greater than the defined row number ​the condition is true and the actions ​in the "If" ​path are executed.
  
-{{:visionx:actions:sum-2.png?nolink|The example of creating sub-totals.}}+Hint: The row numbers start at 0 and not at 1. For example, the row numbered 2 is the 3rd row in the table. 
 + 
 +^Parameter ​      ​^Description ​      ​^Example ​               ^ 
 +|**Table** ​      ​|table ​            ​|**[Table:​ Contacts]** ​ | 
 +|**Row number** ​ |value, parameter ​ |**5** ​                 | 
 + 
 +<code java> 
 +if (rdbContacts.getSelectedRow() > 5) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is selected row greater or equal ==== 
 + 
 +If the current row of the selected table is greater or equal than the defined row number the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +HintThe row numbers start at 0 and not at 1. For example, the row numbered 2 is the 3rd row in the table. 
 + 
 +^Parameter ​      ​^Description ​      ​^Example ​               ^ 
 +|**Table** ​      ​|table ​            ​|**[TableContacts]** ​ | 
 +|**Row number** ​ |value, parameter ​ |**5** ​                 | 
 + 
 +<code java> 
 +if (rdbContacts.getSelectedRow() >= 5) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is selected row smaller ==== 
 + 
 +If the current row of the selected table is smaller than the defined row number the condition is true and the actions ​in the "​If"​ path are executed. 
 + 
 +HintThe row numbers start at 0 and not at 1. For example, the row numbered ​is the 3rd row in the table. 
 + 
 +^Parameter ​      ​^Description ​      ​^Example ​               ^ 
 +|**Table** ​      ​|table ​            ​|**[Table:​ Contacts]** ​ | 
 +|**Row number** ​ |value, parameter ​ |**5** ​                 | 
 + 
 +<code java> 
 +if (rdbContacts.getSelectedRow() < 5) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is selected row smaller or equal ==== 
 + 
 +If the current row of the selected table is smaller or equal than the defined row number the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +Hint: The row numbers start at 0 and not at 1. For example, the row numbered 2 is the 3rd row in the table. 
 + 
 +^Parameter ​      ​^Description ​      ​^Example ​               ^ 
 +|**Table** ​      ​|table ​            ​|**[Table:​ Contacts]** ​ | 
 +|**Row number** ​ |value, parameter ​ |**5** ​                 | 
 + 
 +<code java> 
 +if (rdbContacts.getSelectedRow() <= 5) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is shorter ==== 
 + 
 +If the value length is shorter than the selected length the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +^Parameter ​  ​^Description ​      ​^Example ​                 ^ 
 +|**Value** ​  ​|column ​           |**[Contacts.Birthday]** ​ | 
 +|**Length** ​ |value, parameter ​ |**10** ​                  | 
 + 
 +<code java> 
 +if (Text.isShorter(new Var(rdbContacts,"​FIRSTNAME"​),​10)) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is smaller ==== 
 + 
 +If the selected value is smaller than the limit the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +^Parameter ​ ^Description ​                                 ^Example ​                 ^ 
 +|**Value** ​ |text, column value, filter value, parameter ​ |**[Contacts.Birthday]** ​ | 
 +|**Limit** ​ |text, column value, filter value, parameter ​ |**01.01.1990** ​          | 
 + 
 +<code java> 
 +if (Logical.smaller(rdbContacts.getValue("​BIRTHDAY"​),"​1.1.1990"​)) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is smaller or equal ==== 
 + 
 +If the selected value is smaller or equal than the limit the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +^Parameter ​ ^Description ​                                 ^Example ​                 ^ 
 +|**Value** ​ |text, column value, filter value, parameter ​ |**[Contacts.Birthday]** ​ | 
 +|**Limit** ​ |text, column value, filter value, parameter ​ |**01.01.1990** ​          | 
 + 
 +<code java> 
 +if (Logical.smaller(rdbContacts.getValue("​BIRTHDAY"​),"​1.1.1990"​)) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is tab selected ==== 
 + 
 +If the selected tab is active the condition is true and actions in the "​If"​ path are executed, otherwise the commands in the "​Else"​ path are executed. 
 + 
 +^Parameter ​  ​^Description ​             ^Example ​                       ^ 
 +|**Tabset** ​ |tabsets ​                 |**[Tabset: tabsetPanelMain]** ​ | 
 +|**Tab** ​    ​|tabs ​of selected tabset ​ |**1. contact** ​                | 
 + 
 +<code java> 
 +if (tabsetPanelMain.getSelectedIndex() == 0) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Is visible ==== 
 + 
 +If the selected element is visible the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +Hint: see Actions **Hide element** and **Show element** 
 + 
 +^Parameter ​   ^Description ​ ^Example ​                          ^ 
 +|**Element** ​ |elements ​    ​|**[Editor:​ Contacts.Firstname]** ​ | 
 + 
 +<code java> 
 +if (editContactsFirstname.isVisible()) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Not has record ==== 
 + 
 +Checks if a table is empty. 
 + 
 +Hint: If a filter is used in the screen, you may reset or if needed set the filter to check if there are any records. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​               ^ 
 +|**Table** ​ |tables ​      ​|**[Table:​ Contacts]** ​ | 
 + 
 +<code java> 
 +if (!DataBookUtil.hasRecords(rdbContacts)) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Not has role assigned ==== 
 + 
 +This condition is true if the selected role has not been assigned to the user. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​           ^ 
 +|**Role** ​  ​|roles ​       |**Administrator** ​ | 
 + 
 +<code java> 
 +if (!getApplication().hasRole("​Administrator"​)) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Not is longer ==== 
 + 
 +If the value length is not greater than the selected length the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +^Parameter ​  ​^Description ​      ​^Example ​                 ^ 
 +|**Value** ​  ​|column ​           |**[Contacts.Birthday]** ​ | 
 +|**Length** ​ |value, parameter ​ |**10** ​                  | 
 + 
 +<code java> 
 +if (!Text.isLonger(new Var(rdbContacts,"​FIRSTNAME"​),​10)) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Not is record selected ==== 
 + 
 +If no record of the selected table is selected the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​               ^ 
 +|**Table** ​ |table ​       |**[Table: Contacts]** ​ | 
 + 
 +<code java> 
 +if (rdbContacts.getSelectedRow() < 0) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Not is row selected ==== 
 + 
 +If a certain row of the selected table is not selected the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +Hint: The row numbers start at 0 and not at 1. For example, the row numbered 2 is the 3rd row in the table. 
 + 
 +^Parameter ​      ​^Description ​       ^Example ​               ^ 
 +|**Table** ​      ​|table ​             |**[Table: Contacts]** ​ | 
 +|**Row number** ​ |number, parameter ​ |**5** ​                 | 
 + 
 +<code java> 
 +if (rdbContacts.getSelectedRow() != 5) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +==== Not is shorter ==== 
 + 
 +If the value length is not shorter than the selected length the condition is true and the actions in the "​If"​ path are executed. 
 + 
 +^Parameter ​  ​^Description ​      ​^Example ​                 ^ 
 +|**Value** ​  ​|column ​           |**[Contacts.Lastname]** ​ | 
 +|**Length** ​ |value, parameter ​ |**5** ​                   | 
 + 
 +<code java> 
 +if (!Text.isShorter(new Var(rdbContacts,"​LASTNAME"​),​5)) { 
 +  showInformation(this,"​yes"​);​ 
 +
 +else { 
 +  showInformation(this,"​no"​);​ 
 +
 +</​code>​ 
 +====== List of formulas ====== 
 + 
 +A number of actions can include the use of formulas. E.g. "​Calculate Value"​. 
 + 
 +===== Arithmetic operations ===== 
 + 
 +Formulas allow for the calculation of values using basic arithmetic operations, as well as a variety of group functions. For arithmetic operations ''​%%+%%'',''​%%-%%'',''​%%*%%'',​ ''​%%/​%%''​ and brackets ''​%%(%%''​ ''​%%)%%''​ can be usedE.g.: ''​%%12 *23 / 2 + (1 - [Items.Quantity] * [Items.Price]) - [Booking.Discount]%%''​. 
 + 
 +The arithmetic operations can be used with the following actions: 
 + 
 +  * [[#​calculate_value|Calculate value]] 
 +  * [[#​set_label_with_calculated_currency|Set label with calculated currency]] 
 +  * [[#​set_label_with_calculated_date|Set label with calculated date]] 
 +  * [[#​set_label_with_calculated_date_short|Set label with calculated date short]] 
 +  * [[#​set_label_with_calculated_date_time|Set label with calculated date time]] 
 +  * [[#​set_label_with_calculated_date_time_short|Set label with calculated date time short]] 
 +  * [[#​set_label_with_calculated_time|Set label with calculated time]] 
 +  * [[#​set_label_with_calculated_value|Set label with calculated value]] 
 +  * [[#​set_parameter_with_calculated_value|Set Parameter with calculated value]] 
 + 
 +===== Group Functions ===== 
 + 
 +Group functions calculate results based on all values in a table column. A list is created using each row in the table column; the group function is then applied to this list. E.g. ''​%%avg([Items.Price])%%''​ which returns the average of the prices in the table "​Items"​. 
 + 
 +In addition, all functions are available in the variant to return ''​%%null%%''​ if all values in the column were ''​%%null%%''​. These variants have the same name but are postfixed with "​Null",​ E.g. ''​%%avgNull([Items.Price])%%''​. For additional information see [[http://​en.wikipedia.org/​wiki/​Null_(SQL)|the Wikipedia entry on SQL Null]]. 
 + 
 +The group functions can be used with the following actions: 
 + 
 +  * [[#​calculate_value|Calculate value]] 
 +  * [[#​set_label_with_calculated_currency|Set label with calculated currency]] 
 +  * [[#​set_label_with_calculated_date|Set label with calculated date]] 
 +  * [[#​set_label_with_calculated_date_short|Set label with calculated date short]] 
 +  * [[#​set_label_with_calculated_date_time|Set label with calculated date time]] 
 +  * [[#​set_label_with_calculated_date_time_short|Set label with calculated date time short]] 
 +  * [[#​set_label_with_calculated_time|Set label with calculated time]] 
 +  * [[#​set_label_with_calculated_value|Set label with calculated value]] 
 +  * [[#​set_parameter_with_calculated_value|Set Parameter with calculated value]] 
 + 
 +==== avg / avgNull ==== 
 + 
 +Returns the average of all values. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​           ^ 
 +|**Value** ​ |column ​      ​|**[Items.Price]** ​ | 
 + 
 +<code java> 
 +avg([Items.Price]) 
 +avgNull([Items.Price]) 
 +</​code>​ 
 +==== min / minNull ==== 
 + 
 +Returns the smallest value. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​           ^ 
 +|**Value** ​ |column ​      ​|**[Items.Price]** ​ | 
 + 
 +<code java> 
 +min([Items.Price]) 
 +minNull([Items.Price]) 
 +</​code>​ 
 +==== max / maxNull ==== 
 + 
 +Returns the largest value. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​           ^ 
 +|**Value** ​ |column ​      ​|**[Items.Price]** ​ | 
 + 
 +<code java> 
 +max([Items.Price]) 
 +maxNull([Items.Price]) 
 +</​code>​ 
 +==== count / countNull ==== 
 + 
 +Returns the number of entries. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​           ^ 
 +|**Value** ​ |column ​      ​|**[Items.Price]** ​ | 
 + 
 +<code java> 
 +count([Items.Price]) 
 +countNull([Items.Price]) 
 +</​code>​ 
 +==== sum / sumNull ==== 
 + 
 +Returns the sum of all values. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​           ^ 
 +|**Value** ​ |column ​      ​|**[Items.Price]** ​ | 
 + 
 +<code java> 
 +sum([Items.Price]) 
 +sumNull([Items.Price]) 
 +</​code>​ 
 +==== sumToCurrent / sumToCurrentNull ==== 
 + 
 +Returns the sum of values from the first row to the selected row. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​           ^ 
 +|**Value** ​ |column ​      ​|**[Items.Price]** ​ | 
 + 
 +<code java> 
 +sumToCurrent([Items.Price]) 
 +sumToCurrentNull([Items.Price]) 
 +</​code>​ 
 +==== first / firstNull ==== 
 + 
 +Returns the first value. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​           ^ 
 +|**Value** ​ |column ​      ​|**[Items.Price]** ​ | 
 + 
 +<code java> 
 +first([Items.Price]) 
 +firstNull([Items.Price]) 
 +</​code>​ 
 +==== last / lastNull ==== 
 + 
 +Returns the last value. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​           ^ 
 +|**Value** ​ |column ​      ​|**[Items.Price]** ​ | 
 + 
 +<code java> 
 +first([Items.Price]) 
 +firstNull([Items.Price]) 
 +</​code>​ 
 +===== Date calculation ===== 
 + 
 +The date calculation functions can be used with the following actions: 
 + 
 +  * [[#​calculate_value|Calculate value]] 
 +  * [[#​set_label_with_calculated_date|Set label with calculated date]] 
 +  * [[#​set_label_with_calculated_date_short|Set label with calculated date short]] 
 +  * [[#​set_label_with_calculated_date_time|Set label with calculated date time]] 
 +  * [[#​set_label_with_calculated_date_time_short|Set label with calculated date time short]] 
 +  * [[#​set_label_with_calculated_time|Set label with calculated time]] 
 +  * [[#​set_parameter_with_calculated_value|Set Parameter with calculated value]] 
 + 
 +==== addYears ==== 
 + 
 +Adds a given number of years to the date. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Items.PublicationDate]** ​ | 
 + 
 +<code java> 
 +addYears([Items.PublicationDate],​ 1) 
 +</​code>​ 
 +==== addMonths ==== 
 + 
 +Adds a given number of months to the date. 
 + 
 +^Parameter ​  ​^Description ​ ^Example ​                     ^ 
 +|**Value** ​  |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Amount** ​ |number ​      ​|**1** ​                       | 
 + 
 +<code java> 
 +addMonths([Items.PublicationDate],​ 1) 
 +</​code>​ 
 +==== addDays ==== 
 + 
 +Adds a given number of days to the date. 
 + 
 +^Parameter ​  ​^Description ​ ^Example ​                     ^ 
 +|**Value** ​  |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Amount** ​ |number ​      ​|**1** ​                       | 
 + 
 +<code java> 
 +addDays([Items.PublicationDate],​ 1) 
 +</​code>​ 
 +==== addHours ==== 
 + 
 +Adds a given number of hours to the date. 
 + 
 +^Parameter ​  ​^Description ​ ^Example ​                     ^ 
 +|**Value** ​  |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Amount** ​ |number ​      ​|**1** ​                       | 
 + 
 +<code java> 
 +addHours([Items.PublicationDate],​ 1) 
 +</​code>​ 
 +==== addMinutes ==== 
 + 
 +Adds a given number of minutes to the date. 
 + 
 +^Parameter ​  ​^Description ​ ^Example ​                     ^ 
 +|**Value** ​  |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Amount** ​ |number ​      ​|**1** ​                       | 
 + 
 +<code java> 
 +addMinutes([Items.PublicationDate],​ 1) 
 +</​code>​ 
 +==== addSeconds ==== 
 + 
 +Adds a given number of seconds to the date. 
 + 
 +^Parameter ​  ​^Description ​ ^Example ​                     ^ 
 +|**Value** ​  |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Amount** ​ |number ​      ​|**1** ​                       | 
 + 
 +<code java> 
 +addSeconds([Items.PublicationDate],​ 1) 
 +</​code>​ 
 +==== yearsBetween ==== 
 + 
 +Calculates the years between two dates. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Value** ​ |date column ​ |**1** ​                       | 
 + 
 +<code java> 
 +yearsBetween([Contacts.current date],​[Contacts.Birthday]) 
 +</​code>​ 
 +==== monthsBetween ==== 
 + 
 +Calculates the months between two dates. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Value** ​ |date column ​ |**1** ​                       | 
 + 
 +<code java> 
 +monthsBetween([Contacts.current date],​[Contacts.Birthday]) 
 +</​code>​ 
 +([tag], [tag]) ### daysBetween 
 + 
 +Calculates the days between two dates. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Value** ​ |date column ​ |**1** ​                       | 
 + 
 +<code java> 
 +daysBetween([Contacts.current date],​[Contacts.Birthday]) 
 +</​code>​ 
 +==== hoursBetween ==== 
 + 
 +Calculates the hours between two dates. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Value** ​ |date column ​ |**1** ​                       | 
 + 
 +<code java> 
 +hoursBetween([Contacts.current date],​[Contacts.Birthday]) 
 +</​code>​ 
 +([tag], [tag]) ### minutesBetween 
 + 
 +Calculates the minutes between two dates. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Value** ​ |date column ​ |**1** ​                       | 
 + 
 +<code java> 
 +minutesBetween([Contacts.current date],​[Contacts.Birthday]) 
 +</​code>​ 
 +==== secondsBetween ==== 
 + 
 +Calculates the seconds between two dates. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Items.PublicationDate]** ​ | 
 +|**Value** ​ |date column ​ |**1** ​                       | 
 + 
 +<code java> 
 +secondsBetween([Contacts.current date],​[Contacts.Birthday]) 
 +</​code>​ 
 +==== truncYear ==== 
 + 
 +Truncates the date to the beginning of the year. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Contacts.current date]** ​ | 
 + 
 +<code java> 
 +truncYear([Contacts.current date]) 
 +</​code>​ 
 +^Before ​                   ^After ​                       ^ 
 +|"July 22, 2022, 9:40 AM" ​ |"​January 1, 2022, 12:00 AM" ​ | 
 + 
 +==== truncMonth ==== 
 + 
 +Truncates the date to the beginning of the month. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Contacts.current date]** ​ | 
 + 
 +<code java> 
 +truncMonth([Contacts.current date]) 
 +</​code>​ 
 +^Before ​                   ^After ​                    ^ 
 +|"July 22, 2022, 9:40 AM" ​ |"July 1, 2022, 12:00 AM" ​ | 
 + 
 +==== truncDay ==== 
 + 
 +Truncates the date to the beginning of the day. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Contacts.current date]** ​ | 
 + 
 +<code java> 
 +truncDay([Contacts.current date]) 
 +</​code>​ 
 +^Before ​                   ^After ​                     ^ 
 +|"July 22, 2022, 9:40 AM" ​ |"July 22, 2022, 12:00 AM" ​ | 
 + 
 +==== truncHour ==== 
 + 
 +Truncates the date to the beginning of the hour. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Contacts.current date]** ​ | 
 + 
 +<code java> 
 +truncHour([Contacts.current date]) 
 +</​code>​ 
 +^Before ​                   ^After ​                    ^ 
 +|"July 22, 2022, 9:40 AM" ​ |"July 22, 2022, 9:00 AM" ​ | 
 + 
 +==== truncMinute ==== 
 + 
 +Truncates the date to the beginning of the hour. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Contacts.current date]** ​ | 
 + 
 +<code java> 
 +truncMinute([Contacts.current date]) 
 +</​code>​ 
 +^Before ​                      ​^After ​                       ^ 
 +|"July 22, 2022, 9:40:10 AM" ​ |"July 22, 2022, 9:40:00 AM" ​ | 
 + 
 +==== truncSecond ==== 
 + 
 +Truncates the date to the beginning of the second. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Contacts.current date]** ​ | 
 + 
 +<code java> 
 +truncMinute([Contacts.current date]) 
 +</​code>​ 
 +^Before ​                          ​^After ​                           ^ 
 +|"July 22, 2022, 9:40:10.991 AM" ​ |"July 22, 2022, 9:40:10.000 AM" ​ | 
 + 
 +===== Date group functions ===== 
 + 
 +Group functions calculate results based on all values in a table column. A list is created using each row in the table column; the group function is then applied to this list. E.g. ''​%%avg([Items.Price])%%''​ which returns the average of the prices in the table "​Items"​. 
 + 
 +In addition, all functions are available in the variant to return ''​%%null%%''​ if all values in the column were ''​%%null%%''​. These variants have the same name but are postfixed with "​Null",​ E.g. ''​%%minNull([Customers.Birthdate])%%''​. For additional information see [[http://​en.wikipedia.org/​wiki/​Null_(SQL)|the Wikipedia entry on SQL Null]]. 
 + 
 +The date group functions can be used with the following actions: 
 + 
 +  * [[#​calculate_value|Calculate value]] 
 +  * [[#​set_label_with_calculated_date|Set label with calculated date]] 
 +  * [[#​set_label_with_calculated_date_short|Set label with calculated date short]] 
 +  * [[#​set_label_with_calculated_date_time|Set label with calculated date time]] 
 +  * [[#​set_label_with_calculated_date_time_short|Set label with calculated date time short]] 
 +  * [[#​set_label_with_calculated_time|Set label with calculated time]] 
 +  * [[#​set_parameter_with_calculated_value|Set Parameter with calculated value]] 
 + 
 +==== first / firstNull ==== 
 + 
 +Returns the date value of the first row in the table with an existing value. If the value of the last row is empty the value of the row before with an existing value is taken. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                     ^ 
 +|**Value** ​ |date column ​ |**[Contacts.current date]** ​ | 
 + 
 +<code java> 
 +first([Contacts.current date]) 
 +firstNull([Contacts.current date]) 
 +</​code>​ 
 +==== last / lastNull ==== 
 + 
 +Returns the date value of the last row in the table with an existing value. If the value of the last row is empty the value of the row before with an existing value is taken. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +last([Contacts.current date]) 
 +lastNull([Contacts.current date]) 
 +</​code>​ 
 +==== min / minNull ==== 
 + 
 +Returns the smallest date value in the table. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +min([Contacts.Birthday]) 
 +minNull([Contacts.Birthday]) 
 +</​code>​ 
 +==== max / maxNull ==== 
 + 
 +Returns the greatest date value in the table. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +max([Contacts.Birthday]) 
 +maxNull([Contacts.Birthday]) 
 +</​code>​ 
 +==== avg / avgNull ==== 
 + 
 +Returns the average date value in the table. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +avg([Contacts.Birthday]) 
 +avgNull([Contacts.Birthday]) 
 +</​code>​ 
 +==== sumToCurrent / sumToCurrentNull ==== 
 + 
 +Adds the date values from the beginning up to and including the current row . 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +sumToCurrent([Contacts.Birthday]) 
 +sumToCurrentNull([Contacts.Birthday]) 
 +</​code>​ 
 +==== sumFromCurrent / sumFromCurrentNull ==== 
 + 
 +Adds the date values from the current row up to and including the last row . 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +sumFromCurrent([Contacts.Birthday]) 
 +sumFromCurrentNull([Contacts.Birthday]) 
 +</​code>​ 
 +==== sum / sumNull ==== 
 + 
 +Adds the date values from the table. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +sum([Contacts.Birthday]) 
 +sumNull([Contacts.Birthday]) 
 +</​code>​ 
 +==== count ==== 
 + 
 +Counts the entered non-empty date values in the table. 
 + 
 +The funtion does not return a date value but a number. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +count([Contacts.Birthday]) 
 +</​code>​ 
 +==== row ==== 
 + 
 +Does return the actual row number. 
 + 
 +The funtion does not return a date value but a number. If no row is selected -1 will be returned. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +row([Contacts.Birthday]) 
 +</​code>​ 
 +==== null ==== 
 + 
 +Returns an empty value. 
 + 
 +^Parameter ​ ^Description ​ ^Example ​                 ^ 
 +|**Value** ​ |date column ​ |**[Contacts.Birthday]** ​ | 
 + 
 +<code java> 
 +null([Contacts.Birthday]) 
 +</​code>​ 
 +===== Text operations ===== 
 + 
 +The listed text operations can be used with the following actions: 
 + 
 +  * [[#​calculate_value|Calculate value]] 
 +  * [[#​set_label_with_calculated_currency|Set label with calculated currency]] 
 +  * [[#​set_parameter_with_calculated_value|Set Parameter with calculated value]] 
 + 
 +==== lpad ==== 
 + 
 +If you want all values to have the same length, you can use lpad to fill in the missing positions on the left with spaces or characters. 
 + 
 +If you use it without a padding character, it will be used a single space for padding. 
 + 
 +^Parameter ​         ^Description ​                                        ​^Example ​                   ^ 
 +|**Value** ​         |text, column, parameter ​                            ​|**[Orders.Order Number]** ​ | 
 +|**Target length** ​ |number ​                                             |**15** ​                    | 
 +|**Pad character** ​ |optional - single character (surrounded by quotes) ​ |**'​0'​** ​                   | 
 + 
 +<code java> 
 +lpad({VALUE},​15,'​-'​) 
 +lpad([Orders.Order Number],​15,'​0'​) 
 +lpad({VALUE},15) 
 +</​code>​ 
 +^Before ​  ​^After ​                                 ^ 
 +|"​12345" ​ |"​----------12345" ​                     | 
 +|"​15349" ​ |"​000000000015349" ​                     | 
 +|"​12345" ​ |" ̺  ̺  ̺  ̺  ̺  ̺  ̺  ̺  ̺  ̺12345" ​ | 
 + 
 +==== rpad ==== 
 + 
 +If you want all values to have the same length, you can use rpad to fill in the missing positions on the right with spaces or characters. 
 + 
 +If you use it without a padding character, it will be used a single space for padding. 
 + 
 +^Parameter ​         ^Description ​                                        ​^Example ​                   ^ 
 +|**Value** ​         |text, column, parameter ​                            ​|**[Orders.Order Number]** ​ | 
 +|**Target length** ​ |number ​                                             |**15** ​                    | 
 +|**Pad character** ​ |optional - single character (surrounded by quotes) ​ |**'​0'​** ​                   | 
 + 
 +<code java> 
 +rpad({VALUE},​15,'​-'​) 
 +rpad([Orders.Order Number],​15,'​0'​) 
 +rpad({VALUE},​15) 
 +</​code>​ 
 +^Before ​  ​^After ​                                 ^ 
 +|"​12345" ​ |"​12345----------" ​                     | 
 +|"​15349" ​ |"​153490000000000" ​                     | 
 +|"​12345" ​ |"​12345 ̺  ̺  ̺  ̺  ̺  ̺  ̺  ̺  ̺  ̺ " ​ | 
 + 
 +==== ltrim ==== 
 + 
 +Removes spaces from the beginning of a string. 
 + 
 +^Parameter ​ ^Description ​             ^Example ​                   ^ 
 +|**Value** ​ |text, column, parameter ​ |**[Orders.Order Number]** ​ | 
 + 
 +<code java> 
 +ltrim({VALUE}) 
 +ltrim([Orders.Order Number]) 
 +</​code>​ 
 +^Before ​                       ^After ​         ^ 
 +|" ̺  ̺  ̺  ̺  ̺12345 ̺  ̺ " ​ |"​12345 ̺  ̺ " ​ | 
 +|" ̺  ̺ 15349 ̺  ̺ " ​          ​|"​15349 ̺  ̺ " ​ | 
 + 
 +==== rtrim ==== 
 + 
 +Removes spaces from the end of a string. 
 + 
 +^Parameter ​ ^Description ​             ^Example ​                   ^ 
 +|**Value** ​ |text, column, parameter ​ |**[Orders.Order Number]** ​ | 
 + 
 +<code java> 
 +rtrim({VALUE}) 
 +rtrim([Orders.Order Number]) 
 +</​code>​ 
 +^Before ​                       ^After ​         ^ 
 +|" ̺  ̺12345 ̺  ̺  ̺  ̺  ̺ " ​ |" ̺  ̺12345" ​ | 
 +|" ̺  ̺ 15349 ̺  ̺ " ​          ​|"​ ̺  ̺ 15349" ​ | 
 + 
 +==== trim ==== 
 + 
 +Removes spaces from the beginning and the end of a string. 
 + 
 +^Parameter ​ ^Description ​             ^Example ​                   ^ 
 +|**Value** ​ |text, column, parameter ​ |**[Orders.Order Number]** ​ | 
 + 
 +<code java> 
 +trim({VALUE}) 
 +trim([Orders.Order Number]) 
 +</​code>​ 
 +^Before ​                       ^After ​   ^ 
 +|" ̺  ̺12345 ̺  ̺  ̺  ̺  ̺ " ​ |"​12345" ​ | 
 +|" ̺  ̺ 15349 ̺  ̺ " ​          ​|"​15349" ​ |
  
  
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information