Actions

Previous Next

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 certain data.

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 box.

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:

WI_help0023

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:

RecordDelete()

MessageInformation(Record deleted)

 

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:

Tab_1.ControlSetActiveTab(Page 2)

To express a condition, use a Decision or an Extra Query.

See Also:

Actions Example 1: Automatic Query

Actions Example 2: Button Opening Related Window

Actions Example 3: Button Leading to Tab Page Sensitivity

Actions Example 4: Check Box Leading to Tab Page Sensitivity

Actions Example 5: Contrasting Field Color Based on Record Data

Actions Example 6: Dynamic Default Value

Actions Example 7: Passing a Value to Embedded Web Browser

Actions Example 8: Automatic Insert in Child Table and Related Box

Actions Example 9: Dialog for Search Conditions

Actions Example 10: Catalog Node Leading to Data Query

Actions Example 11: Window with Separate Search Dialog

Actions Example 12: Generic Search Dialog