Creating An Action

There are two places that actions can be added, against a specific type,or globally. Type-based actions (also known as contextual actions) are available only when you are viewing a record that is of that type. Global actions are available no matter what tab you are on. Type-based actions are defined in a Field record. The process to create Type-based and Global actions are similar.

  • To create a contextual (type-based) action, find the field for which you wish to have the action visible, and then select the Actions tab. Then click Create New ( + ) to add the action. 

  • To create a global action, you need to go to the Application record, and then select Actions from the drilldown menu (Hamburger icon). Click the ( + ) to add the action.

 The Actions pop-up window will appear:

 Type-based Actions

Record Actions

 

You'll have to enter the following fields:

Title

This is the title of the action that will be displayed in the What's Next? list.

Action Type

The action type is where you specify whether this will be a Script or a Plugin. The default is Script.

Condition

Specifies an optional condition that must evaluate to true for this action to be visible to the user. The condition must be a simple expression of the format: Field=Value or Field!=Value. The field must exist in this record. If the value is a string, double quotes are not required.

 Note: Fields referenced here will always be displayed in summary view, even if marked as being only displayed in detail view. Plugin 

If the action type is set to Plugin, then you select the plugin to use here. If there is nothing in the list then you will probably need to submit the plugin first (using the Submit .Net Plugin action under What's Next).

Handler

If the action type is set to Plugin and you have selected a plugin, this is where you select the handler defined in the plugin. This will relate to a function you have defined in the plugin DLL.

Script Input Type

Lets you select an existing type within the data model to use for the action parameters.

If you want to create the action input private to this action, then create the action and then use the Script Input Type drilldown to create the parameters for the action.

Run As System

If this is set to Yes, the action will run without any permission restrictions. If it is not set, then the permission restrictions of the user invoking the action will be applied.

Icon

You can choose to select an icon to display next to the action title wherever it is displayed.

Show Only on Tab

For global, top-level actions, this specifies whether the action will only appear when the selected tab is active.

Supports Multi-Select

 If your action was intended to run on lists, instead of a single record, you should set this to Yes. In this case, your action will only be visible if multiple records are selected in the record list. Also, your action should use a special variable called #selection instead of the #input variable. The #selection is a list of paths. You will then have to loop through that list of paths and load each one.

Button?

Indicates if this action will be displayed more prominently on the screen. When this is set to Yes, the action will also display as a button above the record, making it easier to access. This is especially useful for actions that are invoked frequently.

Quick Access?

When an action is set to Quick Access and has an icon set, you will see a small button at the top of the application always available to click. In WorkflowFirst Designer, the publish buttons are examples of Quick Access buttons.

Auto Submit

If set to Yes, the form will automatically submit without needing the user's confirmation. This can be useful if the action doesn't require any more information or confirmation for the submission.

Show Inline

Inline actions will show as buttons as a cell on the record row in the list. An icon must be selected for the action. Such inline action operate on the record where the button displays. Inline actions also honor conditions, so the inline action button will not display if the visible condition evaluates to false.

 Script

This is the code editor where you enter the actual script. This shouldn't be used if a plug-in was selected.

For more information on creating a DbfScript, please refer to DbfScript Reference

When the script is invoked, two special variables will be passed in to the script: 

#input
This holds the action input (parameters) if any was provided. 

• &path
This holds the path to the current record where this action was invoked. 

• &root
The root variable is always available and lets you access any path in the database from the root.

For example, if the parameters to the action included a “PaymentDate” field, you could access that in a formula such as:

set #record/Date = #input/PaymentDate

And, as another example, you can use the path variable to load that part of the database, or a related part.

var #payment = load(&path)

+Script Input Fields

The fields that constitute the action input form.

+Help Pages

A help page to show when the action is displayed on the screen. The help page will be available by clicking the ? button next to the action title.

+Required Roles

Defines the list of roles, any of which the user will be required to have in order for them to be able to see and run the action.

Pop-Up?

By default, an action window will pop-up over the record. If you want the action to display full-screen and changes the URL of the page instead, then set this to No.


Next Topic:
v4.2.0.956 (beta)
Up Since 2/29/2024 12:02:23 AM