📄️ Actions, events and triggers
Actions and events
📄️ Old-style navigation paths
Old-style navigation paths are supported for backward compatibility and because some of the USoft default productions still use this style, in particular, underlying queries in info boxes of type Related Window. They are being replaced by object paths.
📄️ Action scripting and SQL
Action scripts that programmatically make things happen in the GUI interface, such as raising a tab page or opening a window when a user clicks a button, are one thing.
📄️ FORMULA()
In action statement syntax (i.e. in places where SQL syntax is not expected), the FORMULA() application method subjects values to operations that require SQL evaluation.
📄️ Actions Example 1: Automatic query
An info window must query all records automatically as soon as it is opened.
📄️ Actions Example 2: Button opening a Related Window
If the Participants button is pressed, a related window must be opened showing Participant child data.
📄️ Actions Example 3: Button leading to Tab Page sensitivity
If the Cancel button is clicked, the Cancellation Details tab page must be raised automatically to invite the user to enter cancellation details.
📄️ Actions Example 4: Check Box leading to Tab Page sensitivity
This example shows an action that must only fire if a condition is met.
📄️ Actions Example 5: Contrasting field colour based on record data
The action in this example depends on data and is triggered by the Enter Record event.
📄️ Actions Example 6: Dynamic default value
Customers have a personal discount percentage. Whenever the user enters or changes the Customer ID, the customer's current discount percentage must be looked up in the CUSTOMER table and displayed as a default value in the Discount field.
📄️ Actions Example 7: Passing a value to an embedded web browser
This example provides navigation in an embedded web browser control to a URL specified in a field.
📄️ Actions Example 8: Automatic insert in child table and Related Box
This Info Window has bookings in a parent box and participants in an embedded child box.
📄️ Actions Example 9: Dialog for search conditions
This example shows how you can build a Search Dialog that allows the user to enter a date value and a number of days. If the user clicks the Search button, the dialog disappears and a Search Results info window is opened that displays all the tours scheduled on the date entered, or days after that up to the number of days entered:
📄️ Actions Example 10: Catalog node leading to data query
This example shows how a user can select data in a catalog tree or other tree view, and then double-click to open a window and retrieve corresponding data from the database.
📄️ Actions Example 11: Window with separate search dialog
This example features a dialog for permanent assistance with querying data in another window. The example shows how to define object-like properties for handling interaction between windows.
📄️ Actions Example 12: Generic search dialog
This example is a variation on Actions Example 11: Window with Separate Search Dialog. In this example, you will make the search dialog more generic or abstract; making it reusable in different situations.
📄️ Window interaction
Windows can interact with each other. You can set up a permanent interaction between two windows by creating one or two user-defined properties of Window type, and then writing the appropriate action statements.
📄️ Target objects in other windows
Standard action statements refer to objects within the current window.
📄️ Action syntax
You script an action by writing an action script on an event property. A typical event property is the Action event property of a button. When the user presses the button, the script associated with the button's Action property is executed.