Contents...

Action Parameters

Actions can either run with or without any parameters. The parameters constitute the form or dialog that is brought up before the action is run, and the values entered by the user will be passed to the action script for processing.

The parameters to the action input are defined the same way you create a data model type. In the same way, WorkflowFirst will automatically create the input form layout, or use any custom-views you have designed. The generated form will have the same features allowing you to have complex forms, links to other parts of the database, file attachments and so on.

Example of an action parameter screen:

To add action parameters, once you create your action record, enter the data model in the drilldown called Script Input Fields. Here, you add fields much the same way you add fields to a type in the data model. The fields under Script Input Fields will become your input form for the action.

You can also re-use an existing type for your action. To do this, use the Script Input Type field in the Actions to select your type from anywhere in the data model.

In the script, all input fields are accessed in the #input variable. The &path variable will hold the path of where the action was invoked. To load the record where the action was invoked, use load(&path) and assign that to a new variable.

var #rec = load(&path)
message "You ran an action on the record '" + GetTitle(#rec) + "'"

Next Topic: Creating An Action

Action Parameters - WorkflowFirst Customer Support Server, Version 1.0.761 (beta)
Up Since 1/16/2019 8:20:12 PM