You can trigger actions when
events occur. For example:
||You can open or close windows or dialogs when the end user
clicks certain buttons.
||You can change the background color of a field when it displays
||You can have totals re-computed in additional fields each time
new data are displayed.
||You can raise a particular tab page in a Tab object displaying
child data, depending on what data are displayed in a parent
In USoft Developer, many
typical actions are triggered automatically. For example, when you
scroll through parent data, child data in related boxes or windows
are automatically synchronized they "scroll along". You trigger
your own actions by creating method
calls for behavior properties.
Whether or not an action is
triggered sometimes depends on a condition:
For example, if the user
clicks a button, currently displayed customer data are deleted.
In this example, the event is
the button click, the triggering object is the button, and the
action (the method called) is RecordDelete(). The target object is
the info box holding the customer data.
Suppose the delete is only
allowed if the customer has no pending orders. In that case, the
action should only be triggered if that condition is met.
You can type method calls, or
compose them with the help of the Object Activator tool.
An example of a simple method
call script is:
||The event is specified by choosing the appropriate behavior
property for the triggering object. A button click event is
specified by choosing the button's Action property.
||The action is specified by choosing the appropriate target
object and method(s). In the case of the RecordDelete() method, you often do
not need to specify the target object explicitly. This method is a
global method for the current info window.
An example of an explicit
target object is raising the second tab page of a Tab control. You
need to specify the Tab control as the target object:
||To express a condition, use a Decision or an Extra Query.
Actions Example 1:
Example 2: Button Opening Related Window
Example 3: Button Leading to Tab Page Sensitivity
Example 4: Check Box Leading to Tab Page Sensitivity
Example 5: Contrasting Field Color Based on Record Data
Actions Example 6:
Dynamic Default Value
Example 7: Passing a Value to Embedded Web Browser
Example 8: Automatic Insert in Child Table and Related Box
9: Dialog for Search Conditions
Example 10: Catalog Node Leading to Data Query
Example 11: Window with Separate Search Dialog
Actions Example 12:
Generic Search Dialog