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 [2019/07/01 11:40]
robot
visionx:actions [2020/06/10 10:30]
cduncan [Example: Keeping sub-totals current]
Line 14: Line 14:
 ====== 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.+Actions are created, edited and deleted via VisionX'​s GUI designer. They can be used for a number of events, such as, the click of a button. When the selected event occurs during the use of a workscreen, the respective action is performed.
  
 Example: When the event "​button click" occurs, the specified action is executed. For example, the action can show a a report. Example: When the event "​button click" occurs, the specified action is executed. For example, the action can show a a report.
Line 26: Line 26:
 Example: Displaying a report by clicking a button labeled "​Report"​. Example: Displaying a report by clicking a button labeled "​Report"​.
  
-  - Open a workscreen in the GUI Designer ​- e.g.: the "​Contacts"​ workscreen +  - Open a workscreen in the GUI designer ​- e.gthe "​Contacts"​ workscreen. 
-  - Select the "​Report"​ button in the GUI Designer ​and click on the pencil icon+  - Select the "​Report"​ button in the GUI designer ​and click on the pencil icon.
  
 {{:​visionx:​actions:​add-action-1.png?​nolink|Step 2 - Create a new action}} {{:​visionx:​actions:​add-action-1.png?​nolink|Step 2 - Create a new action}}
  
 <​HTML><​ol start="​3"​ style="​list-style-type:​ decimal;"></​HTML>​ <​HTML><​ol start="​3"​ style="​list-style-type:​ decimal;"></​HTML>​
-<​HTML><​li></​HTML>​Click on the button "​Create/​Edit Action"​ to create/edit an action<​HTML></​li></​HTML><​HTML></​ol></​HTML>​+<​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:​add-action-2.png?​nolink|Step 3 - The Action Wizard}}
  
 <​HTML><​ol start="​4"​ style="​list-style-type:​ decimal;"></​HTML>​ <​HTML><​ol start="​4"​ style="​list-style-type:​ decimal;"></​HTML>​
-<​HTML><​li></​HTML>​Enter a description of the action on the "​Description"​ tab<​HTML></​li></​HTML>​ +<​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>​+<​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.}} {{:​visionx:​actions:​add-action-3.png?​nolink|Step 5 - Select the correct action.}}
  
 <​HTML><​ol start="​6"​ style="​list-style-type:​ decimal;"></​HTML>​ <​HTML><​ol start="​6"​ style="​list-style-type:​ decimal;"></​HTML>​
-<​HTML><​li></​HTML>​Select the desired report as parameter<​HTML></​li></​HTML><​HTML></​ol></​HTML>​+<​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:​add-action-4.png?​nolink|Step 6 - The finished report action.}}
  
 <​HTML><​ol start="​7"​ style="​list-style-type:​ decimal;"></​HTML>​ <​HTML><​ol start="​7"​ style="​list-style-type:​ decimal;"></​HTML>​
-<​HTML><​li></​HTML>​Click the "​Verify"​ button and then "​OK"​ to verify and save<​HTML></​li></​HTML><​HTML></​ol></​HTML>​+<​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.+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.
  
-Also, all selection lists can be searched for values using *. E.g."​*show"​ to search for all commands containing "​show"​.+Also, all selection lists can be searched for values using *., e.g."​*show"​ to search for all commands containing "​show"​.
  
 ====== Documentation / Software Developer Specification ====== ====== Documentation / Software Developer Specification ======
  
-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.+When an action is created, the first tab of the action wizard can be used to add a description. Our experience shows thatunfortunatelythe documentation of applications is often neglected, orwhen 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.
  
 In VisionX, the description of the action on the first tab of the action wizard is used for the following: In VisionX, the description of the action on the first tab of the action wizard is used for the following:
  
 <​HTML><​ul></​HTML>​ <​HTML><​ul></​HTML>​
-<​HTML><​li></​HTML><​HTML><​p></​HTML>​Description of the action in the specification document.<​HTML></​p></​HTML>​+<​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>​ <​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>​ 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>​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 (Javadoc) of the action-function in the Java source code.<​HTML></​p></​HTML>​+<​HTML><​li></​HTML><​HTML><​p></​HTML>​Description of the action in the function header (Javadoc) of 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>​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>​ <​HTML><​p></​HTML>​This makes it easy to keep the documentation up to date!<​HTML></​p></​HTML><​HTML></​li></​HTML><​HTML></​ul></​HTML>​
Line 77: Line 77:
 Commands execute predefined operations. They can include parameters that are considered when the action is performed.<​HTML></​li></​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><​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>​+<​HTML><​p></​HTML>​Conditions allow for the execution of commands ​depending ​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>​ 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><​li></​HTML><​HTML><​p></​HTML>​Loops<​HTML></​p></​HTML>​
Line 85: Line 85:
 ====== Commands ====== ====== Commands ======
  
-Commands execute predefined operationsconsidering the specified parameters.+Commands execute predefined operations considering the specified parameters.
  
-===== Formulas in commands ​=====+===== Formulas in Commands ​=====
  
-A number of commands can include the use of formulas. E.g. "​Calculate Value"​.+A number of commands can include the use of formulas, e.g. "​Calculate Value"​.
  
-Formulas allow for the calculation of values using basic arithmetic operationsas well as a variety of group functions. For arithmetic operations ''​%%+%%'',''​%%-%%'',''​%%*%%'',​ ''​%%/​%%''​ and brackets ''​%%(%%''​ ''​%%)%%''​ can be used. E.g.''​%%12 *23 / 2 + (1 - [Items.Quantity] * [Items.Price]) - [Booking.Discount]%%''​.+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 / 2 + (1 - [Items.Quantity] * [Items.Price]) - [Booking.Discount]%%''​.
  
-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"​.+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. For example: ​''​%%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]].+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, please ​see [[http://​en.wikipedia.org/​wiki/​Null_(SQL)|the Wikipedia entry on SQL Null]].
  
 ==== avg / avgNull ==== ==== avg / avgNull ====
Line 161: Line 161:
 firstNull([Items.Price]) firstNull([Items.Price])
 </​code>​ </​code>​
-===== List of all commands ​=====+===== List of All Commands ​=====
  
-The following table shows all commands, descriptions,​ parameters, examples, and the resulting Java Code: Command Description including Parameters and Example Java-Code+The following table shows all commands, descriptions,​ parameters, examples, and the resulting Java code.
  
-==== Workscreen ​commands ​====+==== Workscreen ​Commands ​====
  
-=== Open screen ​===+=== Open Screen ​===
  
 Opens the specified workscreen. Opens the specified workscreen.
Line 178: Line 178:
 getApplication().openWorkScreen("​contacts.client.workscreens.ContactsWorkscreen"​) getApplication().openWorkScreen("​contacts.client.workscreens.ContactsWorkscreen"​)
 </​code>​ </​code>​
-=== Close screen ​===+=== Close Screen ​===
  
 Closes the specified workscreen. Closes the specified workscreen.
Line 189: Line 189:
 ((ProjX)getApplication()).close("​contacts.client.workscreens.ContactsWorkscreen"​) ((ProjX)getApplication()).close("​contacts.client.workscreens.ContactsWorkscreen"​)
 </​code>​ </​code>​
-=== Center ​screen ​===+=== Center ​Screen ​===
  
 Centers the current workscreen (horizontally and vertically). Centers the current workscreen (horizontally and vertically).
Line 198: Line 198:
 center() center()
 </​code>​ </​code>​
-=== Close this screen ​===+=== Close This Screen ​===
  
 Closes the current workscreen. Closes the current workscreen.
Line 207: Line 207:
 close() close()
 </​code>​ </​code>​
-==== DataBook ​commands ​====+==== DataBook ​Commands ​====
  
 === Fetch All === === Fetch All ===
Line 217: Line 217:
 Example: Fetch all rows | [Databook: Contacts] Example: Fetch all rows | [Databook: Contacts]
  
-Hint: This command is used to ensure that all rows of a databook/​view are loaded and displayed (e.g. to search for specific entries)+Hint: This command is used to ensure that all rows of a databook/​view are loaded and displayed (e.g.to search for specific entries).
  
 <​code>​ <​code>​
Line 233: Line 233:
 rdbContacts.setSelectedRow(-1) rdbContacts.setSelectedRow(-1)
 </​code>​ </​code>​
-=== Select ​first row ===+=== Select ​First Row ===
  
 The first row of the specified databook is selected. The first row of the specified databook is selected.
Line 244: Line 244:
 rdbContacts.setSelectedRow(0) rdbContacts.setSelectedRow(0)
 </​code>​ </​code>​
-=== Select ​last row ===+=== Select ​Last Row ===
  
 The last row of the specified databook is selected. The last row of the specified databook is selected.
Line 255: Line 255:
 rdbContacts.setSelectedRow(rdbContacts.getRowCount() - 1) rdbContacts.setSelectedRow(rdbContacts.getRowCount() - 1)
 </​code>​ </​code>​
-=== Select ​last inserted row ===+=== Select ​Last Inserted Row ===
  
 Selects the last inserted row in the specified databook. Selects the last inserted row in the specified databook.
Line 263: Line 263:
 Example: Select last inserted row | [Databook: Contacts] Example: Select last inserted row | [Databook: Contacts]
  
-Hint: This command can be used to transfer data from the last inserted row in a databook to another databookor 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).+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 commandthe values of the row's various columns can be accessed (e.g.using the "Set Value with Text" command).
  
 <​code>​ <​code>​
 DataBookUtil.selectLastInsertedRow(rdbContacts) DataBookUtil.selectLastInsertedRow(rdbContacts)
 </​code>​ </​code>​
-=== Select ​row having value ===+=== Select ​Row Having Value ===
  
 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. 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.
Line 279: Line 279:
 DataBookUtil.selectRowHavingValue(rdbContacts,"​Maria"​) DataBookUtil.selectRowHavingValue(rdbContacts,"​Maria"​)
 </​code>​ </​code>​
-=== Store selection ​===+=== Store Selection ​===
  
-Stores the currently selected row in the specified databookto enable selection of that row at a later time.+Stores the currently selected row in the specified databook to enable selection of that row at a later time.
  
 Parameters: ''​%%[List of all databooks in a workscreen]%%''​ Parameters: ''​%%[List of all databooks in a workscreen]%%''​
Line 292: Line 292:
 DataBookUtil.storeSelection(rdbContacts) DataBookUtil.storeSelection(rdbContacts)
 </​code>​ </​code>​
-=== Restore ​selection ​===+=== Restore ​Selection ​===
  
 The previously saved selection in the specified databook is restored. If no selection is stored, no change is made. The previously saved selection in the specified databook is restored. If no selection is stored, no change is made.
Line 305: Line 305:
 DataBookUtil.restoreSelection(rdbContacts) DataBookUtil.restoreSelection(rdbContacts)
 </​code>​ </​code>​
-=== Insert ​row before ​===+=== Insert ​Row Before ​===
  
 Inserts a new row in the specified databook before the currently selected row. Inserts a new row in the specified databook before the currently selected row.
Line 316: Line 316:
 rdbContacts.insert(true) rdbContacts.insert(true)
 </​code>​ </​code>​
-=== Insert ​row after ===+=== Insert ​Row After ===
  
 Inserts a new row in the specified databook after the currently selected row. Inserts a new row in the specified databook after the currently selected row.
Line 327: Line 327:
 rdbContacts.insert(false) rdbContacts.insert(false)
 </​code>​ </​code>​
-=== Ask before delete ​===+=== Ask Before Delete ​===
  
 Asks the user to confirm before a row is deleted in the specified databook. Asks the user to confirm before a row is deleted in the specified databook.
Line 346: Line 346:
 Example: Calculate value | [Contacts.Total] | [Contacts.Quantity] * [Contacts.Price] Example: Calculate value | [Contacts.Total] | [Contacts.Quantity] * [Contacts.Price]
  
-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.+Hint: This command can be used for various mathematical operations. The result is then written to a table column. ​For example, ​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>​ <​code>​
Line 353: Line 353:
     Calc.val(new Var(rdbContacts,"​PRICE"​)))     Calc.val(new Var(rdbContacts,"​PRICE"​)))
 </​code>​ </​code>​
-=== Set Value with Text ===+=== Set Value With Text ===
  
 Inserts the specified text in the specified databook column. Inserts the specified text in the specified databook column.
Line 377: Line 377:
 Example: Set Value | [Contacts.Filename] | [Details.Filename] Example: Set Value | [Contacts.Filename] | [Details.Filename]
  
-Hint: This command can be used to copy values (text, date, numerical) from one table column to another. ​E.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.+Hint: This command can be used to copy values (text, date, numerical) from one table column to another. ​For example, ​[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>​ <​code>​
Line 391: Line 391:
 Example: Set Current Date | [Contacts.Birthday] Example: Set Current Date | [Contacts.Birthday]
  
-Hint: This command can be used to pre-fill ​all date columns with the current date. Another 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!+Hint: This command can be used to prefill ​all date columns with the current date. Another 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!
  
 <​code>​ <​code>​
Line 413: Line 413:
 === Set Filter Value === === Set Filter Value ===
  
-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 area. A 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 filters. After the value is set, the filter is applied to all rows of the associated table, and only the resulting rows are visible.+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 area. A 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 filters. After the value is set, the filter is applied to all rows of the associated table, and only the resulting rows are visible.
  
 Parameters: ''​%%[List of all filter editors of the workscreen],​ [Value for which all rows are searched]%%''​ Parameters: ''​%%[List of all filter editors of the workscreen],​ [Value for which all rows are searched]%%''​
Line 419: Line 419:
 Example: Set filter value | [Search: Contacts.*] | Johanna Example: Set filter value | [Search: Contacts.*] | Johanna
  
-All datasets that contain"//​Johanna//"​ are shown in the Contacts ​table.+All datasets that contain"//​Johanna//"​ are shown in the contacts ​table.
  
 Hint: This command can be used to restrict access to information according to user roles. Role restriction at the data level! Hint: This command can be used to restrict access to information according to user roles. Role restriction at the data level!
Line 427: Line 427:
   * Department manager can only see own department'​s datasets, filtered by department   * 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 list. E.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).+Another application of this command is the search for a specified dataset based on a master data list. For example, 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).
  
 <​code>​ <​code>​
Line 474: Line 474:
 DataBookUtil.setColumnEditable(new Var(rdbContacts,"​USERNAME"​)) DataBookUtil.setColumnEditable(new Var(rdbContacts,"​USERNAME"​))
 </​code>​ </​code>​
-=== Enable Insert in table ===+=== Enable Insert in Table ===
  
 Enables the insertion of rows in the specified databook. Enables the insertion of rows in the specified databook.
Line 485: Line 485:
 rdbContacts.setInsertEnabled(true) rdbContacts.setInsertEnabled(true)
 </​code>​ </​code>​
-=== Disable Insert in table ===+=== Disable Insert in Table ===
  
 Disables the insertion of rows in the specified databook. Disables the insertion of rows in the specified databook.
Line 496: Line 496:
 rdbContacts.setInsertEnabled(false) rdbContacts.setInsertEnabled(false)
 </​code>​ </​code>​
-=== Enable Edit in table ===+=== Enable Edit in Table ===
  
 Enables editing of data in the specified databook. Enables editing of data in the specified databook.
Line 507: Line 507:
 rdbContacts.setUpdateEnable(true) rdbContacts.setUpdateEnable(true)
 </​code>​ </​code>​
-=== Disable Edit in table ===+=== Disable Edit in Table ===
  
 Disables editing of data in the specified databook. Disables editing of data in the specified databook.
Line 518: Line 518:
 rdbContacts.setUpdateEnabled(false) rdbContacts.setUpdateEnabled(false)
 </​code>​ </​code>​
-=== Enable Delete in table ===+=== Enable Delete in Table ===
  
 Enables deletion of rows in the specified table. Enables deletion of rows in the specified table.
Line 529: Line 529:
 rdbContacts.setDeleteEnabled(true) rdbContacts.setDeleteEnabled(true)
 </​code>​ </​code>​
-=== Disable Delete in table ===+=== Disable Delete in Table ===
  
 Disables deletion of rows in the specified table. Disables deletion of rows in the specified table.
Line 540: Line 540:
 rdbContacts.setDeleteEnabled(false) rdbContacts.setDeleteEnabled(false)
 </​code>​ </​code>​
-=== Enable ​data manipulation ​in table ===+=== Enable ​Data Manipulation ​in Table ===
  
 Enables all data manipulation (insert, edit, delete) in the specified databook. Enables all data manipulation (insert, edit, delete) in the specified databook.
Line 551: Line 551:
 rdbContacts.setReadOnly(false) rdbContacts.setReadOnly(false)
 </​code>​ </​code>​
-=== Disable ​data manipulation ​in table ===+=== Disable ​Data Manipulation ​in Table ===
  
 Disables all data manipulation (insert, edit, delete) in the specified databook. Disables all data manipulation (insert, edit, delete) in the specified databook.
Line 562: Line 562:
 rdbContacts.setReadOnly(true) rdbContacts.setReadOnly(true)
 </​code>​ </​code>​
-==== Delete ​row ====+==== Delete ​Row ====
  
-Delets ​the currently selected row in the specified databook.+Deletes ​the currently selected row in the specified databook.
  
 Parameters: ''​%%[List of all databooks in a workscreen]%%''​ Parameters: ''​%%[List of all databooks in a workscreen]%%''​
Line 573: Line 573:
 rdbContacts.delete();​ rdbContacts.delete();​
 </​code>​ </​code>​
-==== Table view (Navigation ​tablecommands ​====+==== Table View (Navigation ​TableCommands ​====
  
 === Show Insert Button === === Show Insert Button ===
Line 709: Line 709:
 navContacts.setAutoResize(true) navContacts.setAutoResize(true)
 </​code>​ </​code>​
-==== Change ​management commands ​====+==== Change ​Management Commands ​====
  
-=== Discard ​all changes ​===+=== Discard ​All Changes ​===
  
 All unsaved changes in all databooks of the current workscreen are discarded. All unsaved changes in all databooks of the current workscreen are discarded.
Line 728: Line 728:
 Example: Save Example: Save
  
-Hint: This command can be used before a report is shownor to save changes in a form using a "​Save"​ button.+Hint: This command can be used before a report is shown or to save changes in a form using a "​Save"​ button.
  
 <code java> <code java>
 getDataSource().saveAllDataBooks() getDataSource().saveAllDataBooks()
 </​code>​ </​code>​
-=== Save table ===+=== Save Table ===
  
 Saves all unsaved changes in the specified databook. Saves all unsaved changes in the specified databook.
Line 744: Line 744:
 rdbContacts.saveAllRows() rdbContacts.saveAllRows()
 </​code>​ </​code>​
-=== Reload ​table ===+=== Reload ​Table ===
  
 Reloads all datasets in the specified databook from the database. Reloads all datasets in the specified databook from the database.
Line 755: Line 755:
 rdbContacts.reload() rdbContacts.reload()
 </​code>​ </​code>​
-=== Reload ​all ===+=== Reload ​All ===
  
 Reloads all databooks in the current workscreen from the database. Reloads all databooks in the current workscreen from the database.
Line 764: Line 764:
 getDataSource().reloadAllDataBooks() getDataSource().reloadAllDataBooks()
 </​code>​ </​code>​
-=== Reload ​all screens ​===+=== Reload ​All Screens ​===
  
 Reloads all databooks in all open workscreens from the database. Reloads all databooks in all open workscreens from the database.
Line 775: Line 775:
 === Manual Save and Reload === === Manual Save and Reload ===
  
-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.+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 isthereforenecessary to create separate "​Save"​ and "​Cancel"​ buttons for these workscreens with the respective functionality.
  
 Example: Manual save and reload Example: Manual save and reload
Line 782: Line 782:
 setManualSaveAndReload(true) setManualSaveAndReload(true)
 </​code>​ </​code>​
-==== Report ​commands ​====+==== Report ​Commands ​====
  
 === Show Report === === Show Report ===
Line 814: Line 814:
 Example: Save Report | [Contacts.Filename] | [Contacts.Image] | Form Report Contacts Example: Save Report | [Contacts.Filename] | [Contacts.Image] | Form Report Contacts
  
-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).+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).
  
 <code java> <code java>
Line 822: Line 822:
     getFormReportContacts())     getFormReportContacts())
 </​code>​ </​code>​
-=== Import Report (merge) ===+=== Import Report (Merge) ===
  
-Imports the specified report. All of the report'​s data is imported to the relevant rows and fields of the workscreen. If "​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 similarity) are 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.+Imports the specified report. All of the report'​s data is imported to the relevant rows and fields of the workscreen. If "​Merge"​ is selected, only changed, deletedor new information is imported. Data that already exists is not added separately. If "​Insert"​ is used, all data rows, including existing rows (tested for similarity) are transferred. This functionality is only available for XLSX (Excel) and XML reports that were created using VisionX. Of coursethe report templates can be edited. This is command is used to import offline forms into the application.
  
 Parameters: ''​%%[List of all reports in the workscreen]%%''​ Parameters: ''​%%[List of all reports in the workscreen]%%''​
Line 833: Line 833:
 ProjXUtil.importFile(this,​ "/​reports/​screens/​ContactsWorkScreen$ContactsForm.xls",​ true) ProjXUtil.importFile(this,​ "/​reports/​screens/​ContactsWorkScreen$ContactsForm.xls",​ true)
 </​code>​ </​code>​
-=== Import Report (insert) ===+=== Import Report (Insert) ===
  
 See [[#​import_report_(merge)|Import Report (merge)]] above See [[#​import_report_(merge)|Import Report (merge)]] above
Line 840: Line 840:
 ProjXUtil.importFile(this,​ "/​reports/​screens/​ContactsWorkScreen$ContactsForm.xls",​ false) ProjXUtil.importFile(this,​ "/​reports/​screens/​ContactsWorkScreen$ContactsForm.xls",​ false)
 </​code>​ </​code>​
-==== File upload/download commands ​====+==== File Upload/Download Commands ​====
  
 === Upload File to === === Upload File to ===
  
-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: ''​%%[Filename:​ List of all columns of all databooks in a workscreen]%%'',​ ''​%%[File:​ List of all columns of all databooks in a workscreen]%%''​.+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: ''​%%[Filename:​ List of all columns of all databooks in a workscreen]%%'',​ ''​%%[File:​ List of all columns of all databooks in a workscreen]%%''​.
  
 Example: Upload file | [Contacts.Filename] | [Contacts.Image] Example: Upload file | [Contacts.Filename] | [Contacts.Image]
  
-Hint: This command can be used to saved files in a databook(e.g. emails, proposals and other business reports).+Hint: This command can be used to saved files in a databook (e.g.emails, proposals and other business reports).
  
 <code java> <code java>
Line 896: Line 896:
 ProjXUtil.deleteFile(*,​*) ProjXUtil.deleteFile(*,​*)
 </​code>​ </​code>​
-==== GUI component commands ​====+==== GUI Component Commands ​====
  
 === Disable Component === === Disable Component ===
Line 944: Line 944:
 === Deselect Button === === Deselect Button ===
  
-Deselects the specified button (checkbox, radio- or toggle button).+Deselects the specified button (checkbox, radio-or toggle button).
  
 Parameters: ''​%%[List of all buttons (checkbox, radio- and toggle) on the workscreen]%%''​ Parameters: ''​%%[List of all buttons (checkbox, radio- and toggle) on the workscreen]%%''​
Line 955: Line 955:
 === Select Button === === Select Button ===
  
-Selects the specified button (checkbox, radio- or toggle button).+Selects the specified button (checkbox, radio-or toggle button).
  
 Parameters: ''​%%[List of all buttons (checkbox, radio- and toggle) on the workscreen]%%''​ Parameters: ''​%%[List of all buttons (checkbox, radio- and toggle) on the workscreen]%%''​
Line 1016: Line 1016:
 tabsetPanelMain. setTextAtIfExists("​Tab 2","​Tab 2 New") tabsetPanelMain. setTextAtIfExists("​Tab 2","​Tab 2 New")
 </​code>​ </​code>​
-=== Set Label with calculated ​Value ===+=== Set Label With Calculated ​Value ===
  
 Calculates the result of the specified formula (see [[#​formulas_in_commands|Formulas in commands]]) and writes it to the specified label (GUI element). Calculates the result of the specified formula (see [[#​formulas_in_commands|Formulas in commands]]) and writes it to the specified label (GUI element).
Line 1024: Line 1024:
 Example: Set label with calculated value | [Contacts.Total] | [Contacts.Quantity] * [Contacts.Price] Example: Set label with calculated value | [Contacts.Total] | [Contacts.Quantity] * [Contacts.Price]
  
-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.+Hint: This command can be used for various mathematical operations. The result is then written to a table column. ​For example, ​calculation of the total price based on quantity and unit price.
  
 Additional details regarding the use of formulas in commands can be found in [[#​formulas_in_commands|Formulas in commands]]. Additional details regarding the use of formulas in commands can be found in [[#​formulas_in_commands|Formulas in commands]].
Line 1043: Line 1043:
 Hint: This command can be used to populate text columns with fixed text or values from other columns. Hint: This command can be used to populate text columns with fixed text or values from other columns.
  
-In the example on the right, the value from "​Lastname",​ the fixed text ", " (comma + space) and the value from "​Firstname"​ is written to the column "​Name":​ "Doe, John"+In the example on the right, the value from "​Lastname",​ the fixed text ", " (comma + space) and the value from "​Firstname"​ is written to the column "​Name":​ "Doe, John".
  
 <code java> <code java>
Line 1052: Line 1052:
     Text.val(new Var(rdbContacts,"​FIRSTNAME"​)))     Text.val(new Var(rdbContacts,"​FIRSTNAME"​)))
 </​code>​ </​code>​
-=== Disable ​all components ​===+=== Disable ​All Components ​===
  
 Disables all components in the given container. Disables all components in the given container.
Line 1063: Line 1063:
 ProjXUtil.setComponentsEnabled(pnlMain,​ false) ProjXUtil.setComponentsEnabled(pnlMain,​ false)
 </​code>​ </​code>​
-=== Enable ​all components ​===+=== Enable ​All Components ​===
  
 Enables all components in the given container. Enables all components in the given container.
Line 1074: Line 1074:
 ProjXUtil.setComponentsEnabled(pnlMain,​ true) ProjXUtil.setComponentsEnabled(pnlMain,​ true)
 </​code>​ </​code>​
-==== Additional ​commands ​====+==== Additional ​Commands ​====
  
 === Logout === === Logout ===
Line 1119: Line 1119:
 Example: Validation error | [Input field: Contacts.Street] is a required field. Example: Validation error | [Input field: Contacts.Street] is a required field.
  
-Hint:​Validation errors are always used for the GUI element "field validation."​ If email is empty, then validation error "​..."​!+Hint: Validation errors are always used for the GUI element "field validation."​ If email is empty, then validation error "​..."​!
  
 <code java> <code java>
Line 1168: Line 1168:
 getConnection().callAction("​action"​) getConnection().callAction("​action"​)
 </​code>​ </​code>​
-=== Silent ​abort ===+=== Silent ​Abort ===
  
 Aborts the current operation silently and completely. Aborts the current operation silently and completely.
Line 1191: Line 1191:
     (String)rdbContacts.getValue("​FIRSTNAME"​))     (String)rdbContacts.getValue("​FIRSTNAME"​))
 </​code>​ </​code>​
-=== QR E-Mail ​===+=== QR Email ===
  
-Converts the given E-Mail ​address into a QR code and saves it in the given column.+Converts the given email address into a QR code and saves it in the given column.
  
 Parameters: ''​%%[List of all columns of all databooks in a workscreen],​ [List of all columns of all databooks in a workscreen]%%''​ Parameters: ''​%%[List of all columns of all databooks in a workscreen],​ [List of all columns of all databooks in a workscreen]%%''​
Line 1205: Line 1205:
     (String)rdbContacts.getValue("​EMAIL"​))     (String)rdbContacts.getValue("​EMAIL"​))
 </​code>​ </​code>​
-=== QR Phone number ​===+=== QR Phone Number ​===
  
 Converts the given phone number into a QR code and saves it in the given column. Converts the given phone number into a QR code and saves it in the given column.
Line 1211: Line 1211:
 Parameters: ''​%%[List of all columns of all databooks in a workscreen],​ [List of all columns of all databooks in a workscreen]%%''​ Parameters: ''​%%[List of all columns of all databooks in a workscreen],​ [List of all columns of all databooks in a workscreen]%%''​
  
-Exmaple: QR Text | [Contacts.Qr] | [Contacts.Phone]+Example: QR Text | [Contacts.Qr] | [Contacts.Phone]
  
 <code java> <code java>
Line 1219: Line 1219:
     (String)rdbContacts.getValue("​PHONE"​))     (String)rdbContacts.getValue("​PHONE"​))
 </​code>​ </​code>​
-=== QR Geo location ​===+=== QR Geo Location ​===
  
 Converts the given location into a QR code and saves it in the given column. Converts the given location into a QR code and saves it in the given column.
Line 1258: Line 1258:
 ====== Conditions ====== ====== Conditions ======
  
-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 metand another if the condition is not met.+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.
  
-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.+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.
  
 Example: Example:
Line 1273: Line 1273:
     - Write the current date to "​Userdata.Changedon"​     - Write the current date to "​Userdata.Changedon"​
  
-===== If Equals / If not Equals / If Greater / If Greater ​Or Equal / If Smaller / If Smaller ​Or Equal =====+===== If Equals / If Not Equals / If Greater / If Greater ​or Equal / If Smaller / If Smaller ​or 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. 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.
Line 1307: Line 1307:
 } }
 </​code>​ </​code>​
-===== If a row is selected ​=====+===== If a Row is Selected ​=====
  
-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 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.
  
 Parameters: ''​%%[List of all tables of the workscreen]%%''​ Parameters: ''​%%[List of all tables of the workscreen]%%''​
Line 1322: Line 1322:
 } }
 </​code>​ </​code>​
-===== Has Role / Not has Role =====+===== Has Role / Not Has Role =====
  
-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.+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.
  
 Parameters: ''​%%[List of all roles in the application]%%''​ Parameters: ''​%%[List of all roles in the application]%%''​
Line 1361: Line 1361:
 ===== Is Visible ===== ===== Is Visible =====
  
-If the specified GUI element is visible (see command "Show Component"​),​ then the commands in the "​If"​ path are executed, ​otherwise ​the commands in the "​Else"​ path are executed.+If the specified GUI element is visible (see command "Show Component"​),​ then the commands in the "​If"​ path are executed. Otherwise, the commands in the "​Else"​ path are executed.
  
 Parameters: ''​%%[List of all GUI elements of the workscreen]%%''​ Parameters: ''​%%[List of all GUI elements of the workscreen]%%''​
Line 1377: Line 1377:
 ===== Is Button Selected ===== ===== Is Button Selected =====
  
-If the specified button is selected (checked) (see command "show element"​),​ then the commands in the "​If"​ path are executed, ​otherwise ​the commands in the "​Else"​ path are executed.+If the specified button is selected (checked) (see command "show element"​),​ then the commands in the "​If"​ path are executed. Otherwise, the commands in the "​Else"​ path are executed.
  
 Parameters: ''​%%[List of all GUI elements of the workscreen]%%''​ Parameters: ''​%%[List of all GUI elements of the workscreen]%%''​
Line 1393: Line 1393:
 ===== Is Tab Selected ===== ===== Is Tab Selected =====
  
-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 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.
  
 Parameters: ''​%%[Element:​ List of all tab controls of the workscreen]%%''​ Parameters: ''​%%[Element:​ List of all tab controls of the workscreen]%%''​
Line 1411: Line 1411:
 ===== Is Column Changed ===== ===== Is Column Changed =====
  
-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 columns is changed (value changed)then the commands in the "​If"​ path are executed. Otherwise, the commands in the "​Else"​ path are executed.
  
 Parameters: ''​%%[List of all table columns in a workscreen]%%''​ Parameters: ''​%%[List of all table columns in a workscreen]%%''​
Line 1427: Line 1427:
 ===== Are Validations Ok ===== ===== Are Validations Ok =====
  
-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 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.
  
 Parameters: ''​%%[List of all validation results]%%''​ Parameters: ''​%%[List of all validation results]%%''​
Line 1433: Line 1433:
 Hint: This condition is often used to perform and show all field validations. If validation errors (see command "​Validation Error"​) occur during the field validations,​ they are collectively shown in the specified validation result element. Hint: This condition is often used to perform and show all field validations. If validation errors (see command "​Validation Error"​) occur during the field validations,​ they are collectively shown in the specified validation result element.
  
-What does "on the same panel "mean?+What does "on the same panel" mean?
  
 "​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. "​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.
Line 1449: Line 1449:
 ===== Is Invalid Email ===== ===== Is Invalid Email =====
  
-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 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.
  
 Parameters: ''​%%[List of all columns of all tables in the workscreen or a fixed value]%%''​ Parameters: ''​%%[List of all columns of all tables in the workscreen or a fixed value]%%''​
Line 1465: Line 1465:
 ===== Is Showing ===== ===== Is Showing =====
  
-This condition is true if the workscreen is showing and the operations "​open"​ and "​load"​ have been completed. The 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.+This condition is true if the workscreen is showing and the operations "​open"​ and "​load"​ have been completed. The 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.
  
 <code java> <code java>
Line 1479: Line 1479:
 ===== 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>
Line 1551: Line 1551:
 Loops are used to execute commands multiple times for the datasets of a table/view. Loops are used to execute commands multiple times for the datasets of a table/view.
  
-===== Example: Create ​sum =====+===== Example: Create ​Sum =====
  
-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 table, which is used as the parameter for the repetition.+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 table, which is used as the parameter for the repetition.
  
 {{:​visionx:​actions:​sum-1.png?​nolink|The example of creating a sum.}} {{:​visionx:​actions:​sum-1.png?​nolink|The example of creating a sum.}}
Line 1563: Line 1563:
 All prices are added and the total is saved in the "​Bill.Total"​ column All prices are added and the total is saved in the "​Bill.Total"​ column
  
-===== Example: Keeping ​sub-totals current ​=====+===== Example: Keeping ​Subtotals Current ​=====
  
-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.+Another common example is the generation of subtotals ​after each individual entry. In the example below, the table "​To-dos"​ contains a column "​Value1"​ (e.g.for expenses). For each to-do rowwe would like to know the amount of expenses that have accumulated up to and including the current ​to-do item.
  
-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.+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 subtotal ​of expenses in each To-do row.
  
-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 savedand restored after the operation is completed.+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 "To-dos" table should be saved and restored after the operation is completed.
  
 {{:​visionx:​actions:​sum-2.png?​nolink|The example of creating sub-totals.}} {{:​visionx:​actions:​sum-2.png?​nolink|The example of creating sub-totals.}}
  
  
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information