Call Routine Action

This action allows you to reuse the actions of another control

Updated over a week ago

The Call Routine action (previously known as Call Another Action Set) allows you to reuse a set of pre-defined actions.

As shown in the below image, there are two types of routines you can call:

  • Screen Call Routine: Use a set of actions from another control on the Screen. In the above image, there are three on screen events to call.

  • App Call Routine: Use a set of actions from an App Routine defined in the App. In the above image, there is only one app routine to call.

The parameters for this action change depending on what is selected. 


Screen Call Routine — Parameters 

This is allows you to reuse the same actions from different control on the same screen without the need to duplicate them.

Parameter

Description

Select a routine

The control with the action set you wish to reuse. Enclosed in the brackets is the event that holds the action set.

Jump to this action set

This will take you to the action set of the chosen routine.


Why You Should Use Call Routine

Imagine the screen has three different ways of saving the record:

  • Save 

  • Save and back

  • Save and new

All of these buttons have the same actions for saving. However, the last two options (Save & Back, and Save & New) have an additional action:

In the above image, the first four actions (highlighted in yellow) are all the same and are required for saving the record. However, this is an inefficient way to do this, because of the difficulty in updating the save action. What would happen if another action was required before the Save All? Then each button would need to be manually edited to add in that action.

However, if you use the Call Routine Action, you can do this:

The SaveBack and SaveNew buttons tells the Save button to do its actions first. So if you ever need to change how a record is saved, you only have to change it in one place.


App Call Routine — Parameters

When you select an App Routine from the dropdown, the number of parameters change. App routines must be created from the Manage section of the app. 

Using the example from the Create App Routine article, you can setup the Call Routine action as shown:

Description

Select a routine

The active app routine defined in the current app. For App Routines with multiple revisions, the published revision is shown.

Action Results Inputs

(Only shown if App Routine was created to take one or more inputs)
The value(s) sent to the App Routine as input.

Wait for routine to complete

There are two choices as explained below.


Wait for routine to complete before continuing with remaining actions. (slower)

This option will run the App Routine and not continue with any of the actions after Call Routine until this the App Routine is finished.

When selected, the following parameter shows up if the app routine has an output defined (as shown in the above image).

Description

Action Results Outputs
Action Result From App Routine

If the app routine has any output, select where you wish to store the output results of the App Routine.


Don't wait for routine to finish and continue with remaining actions. (faster)

This option will run the App Routine will run in the background and not wait for it to finish before continuing with the rest of the actions after the Call Routine.

You can specify a to indicate when it is complete.

Note you cannot specify an App Routine that has an output for this option.

Description

Show user background processing message

  • Do not show a message to the user

  • Show default message "One or more actions have been sent to be processed in the background."

  • Show custom message: When selected, options appear to define the message.

Did this answer your question?