When working with several jobs, sometimes the toolbar Run button (green circle with an arrow) doesn't reflect the currently displayed job. This can lead to an accidental running of a job which is problematic if the job deletes files or changes data.
tMsgBox is a component that will display a dialog box that can gather a confirmation from a user before proceeding. The following screenshot shows a tMsgBox confirming a delete operation before proceeding.
tMsgBox Prompting Confirmation of a Deletion |
The tMsgBox uses the Run If trigger to invoke the delete operations if the user selects "Yes". To use the Run If,
- Right-click on the tMsgBox
- Select Trigger > Run If
- Connect to the following subjob.
- Select the If connector
- Enter a condition like the following
"0" indicates a success or "Yes" value; "1" indicates a "No". There is no explicit handling of a No, the job stops.
Other possible comparisons are listed below. Return values are based on the Buttons select in the tMsgBox Component View.
- YES_OPTION = 0
- NO_OPTION = 1
- CANCEL_OPTION = 2
- OK_OPTION = 0
- CLOSED_OPTION = -1
No comments:
Post a Comment