Skip to main content

getHashValue

A Workflow Engine function that creates a hash value (32-bit integer) from a CEvent or WorkflowContext field value and copies it to a destination field or the source field (if no destination was specified).

This function is available as a feature of the Add-ons v2.5 download and later.

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

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function getHashValue takes the following arguments:

Name

Required

Type

Description

source

yes

string

The CEvent or workflowContext field whose value to hash.

destination

no

string

Optional destination field to set to the resulting hash value to. If not specified the source is used.

Example

To hash a description from an event and set custom_info.hashedDescr to the resulting value:

  • source : description

  • destination : custom_info.hashedDescr

This appears in the UI as:

{"source":"description","destination":"custom_info.hashedDescr"}

The resulting CEvent object would have the following attributes. Note the result is a string and not an integer.

{
    ...
    "custom_info": {
        "hashedDescr": "1018360226",
        ...
    },
    "description": "This is a plan text description that will be hashed",
 ...
}