Skip to main content

copyFromContext

A Workflow Engine function that copies a field from the workflowContext to a destination object field. The function overwrites the destination field if it exists, and creates and populates it if it does not. Returns false if the workflowContext field does not exist.

This function is available as a feature of the Workflow Engine v1.2 download and later.

This function is available for event, alert, and Situation workflows.

The workflow sweep up filter applies to this function.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function copyFromContext takes the following arguments:

Name

Required

Type

Description

from

Yes

String

Source workflowContext field.

to

Yes

String

Destination object field.

Example

The following example demonstrates typical use of Workflow Engine function workflowEngineFunction.

To copy the value of the workflowContext field “visualise.cookbook_name” to “custom_info.sourceCookbook”, set the following:

  • from: visualize.cookbook_name

  • to: custom_info.sourceCookbook

The UI translates your settings to the following JSON:

{ “from”:”visualise.cookbook_name”, "to":"custom_info.sourceCookbook"}