Using a Decision to Check if a Job Should Run

Previous Next

To make job execution dependent on the user entering an (appropriate) filename in a dialog field F1, using a decision.

1.Define a new decision D1.
2.Define the following SQL statement for D1:

SELECT   'JOBNAME, datafile='||:F1

WHERE    :fname IS NOT NULL

3.Define Yes Action:

job(:1)

 

4.Define No Action:

message-error(You must enter a valid filename.)

 

5.Allow the end user to call the decision, for instance, by setting the Action property of a dialog button to:

action-decision(D1)