Skip to main content

listSituationAlertIds

A Workflow Engine function that adds the current alertIds in the Situation into the workflow context under “situationAlertIds”. By default, this is a JSON list (an array). Optionally, you can convert this information to a CSV string. You can use the resulting object in subsequent actions as needed. When used with a sweep up filter, the final list contains the unique alert ids from all in-scope Situations.

This action uses the underlying MoogDbV2 API call getSituationAlertIds().

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

This function is available for Situation workflows only.

The workflow sweep up filter applies to this function.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function listSituationAlertIds takes the following arguments:

Name

Required

Type

Description

convertToCSV

no

string (true|false)

Converts the resulting list to a CSV.

Example

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

The resulting workflow context when using the default (list):

WORKFLOW CONTEXT: SITUATION: 186 :  : 
{
    "situationAlertIds": [
        569,
        570,
        571,
        532
    ]
}

When “convertToCSV” is set to true, the resulting workflow context is:

WORKFLOW CONTEXT: SITUATION: 186 :  : 

WORKFLOW CONTEXT: SITUATION: 186 :  : 
{
    "situationAlertIds": "569,570,571,532"
}