This documentation supports an earlier version of BMC Helix Operations Management.

To view the documentation for the latest version, select 23.1 from the Product version picker.

Functions for advanced and time-based enrichment

Functions are mathematical operations that can be performed to modify slot values and to retrieve information related to slot values. BMC Helix Operations Management offers event and return functions.

Event functionsReturn functions
These functions are also known as void functions and do not return a value. They are often used for event-based actions to change the event state. You can add void functions from the Actions toolbar. This action can be directly added on the policy workflow.

These functions are also known as non-void functions and return a value. They are used for enrichment and variable assignment. They can be configured as the value for the Variable and Enrich actions.

Keep in mind that the function output type must match the data type of the slot that you want to enrich.


Important

For the event slots that have the string or list of string data types, the character limit of the slot value is 32766. If the value goes above this limit, the value is trimmed, which results in data loss.

Event functions

Event functions are also known as void functions and do not return a value.

DropNewEvent

This function drops incoming events as they occur. After execution, the dropped events are not saved and are not available on the UI.

Important

We recommend that you use this function at the end of the policy workflow so that the policy continues to execute if you have other actions in the workflow.


GenerateNewEvent

This function generates events for a specific event class. The following table lists the parameters and slots for the selected class that are displayed as inputs for the function. After execution, the generated event is displayed on the Events page.

Important

  • If you use an Enrich action after this function in the policy workflow, the enrichment applies to incoming events and not the generated event.
  • Manually specify variables (wherever applicable) for function inputs; for example, $dbname, $tablespace.
    When the policy is applied, the variable names are replaced with the variable values that you have configured in the policy workflow.

Input


InputTypeDescription
1Event ClassENUM

Out-of-the-box or custom class for which you want to generate the event.

Default: Event

Note: The Anomaly event class is not supported.

2Event SeverityENUM

Severity for the generated event.

Default: Minor

3Event PriorityENUM

Priority for the generated event.

Default: Moderate

4Source HostnameString

Host name of the event provider.

We recommend a character limit of 256 characters.

5MessageString

Message that you want to include in the generated event. Use the % character to include slot placeholders. When the policy is applied, the placeholders are replaced with values from the incoming event.

We recommend a character limit of 1024 characters.

6Source IdentifierString

Unique event source identifier which can be used for associating the event with the Entity/CI.

We recommend a character limit of 256 characters.

7Mandatory and dedup slotsDepends on the class you select

Mandatory and dedup slots for the selected class. Dedup slots may or may not be mandatory. If you do not mention a value in dedup slots, a blank value is considered for enrichment. For more information on mandatory and dedup slots, see Slot facets.

For example: If you select the Alarm class, Alarm ID is displayed as a dedup slot which is a mandatory slot.

If you haven’t set a default value for a slot in the event class definition, the function considers the slot value that you enter.

8Non-mandatory slotsDepends on the class you select

Choose additional slots to add in the generated event for the selected class by using the option. This option does not list the read-only or internal slots.

If you haven’t set a default value for a slot in the event class definition, the function considers the slot value that you enter.

If you have set a default value for a slot in the event class definition, but you haven’t added the slot in the function. In this case, the default value for the slot is considered the slot value.

Use the delete icon to delete the added slot.  Once you add and save a slot from the list, the slot is disabled for selection. To enable the slot, delete and add it again.

Supported data types for slots:

  • ENUM
  • String
  • List
  • Integer

The date data type is not supported for slots.

To understand a use case for this function, see Example: Generate events to check application availability.


Important

You can add or modify a note in existing events. In the Update old events flow on the policy workflow, use the following functions after the Lookup action:

  • AddOperation
  • AddNote
  • SetNote

AddOperation

This function adds a note in an incoming or existing event when an event is assigned, acknowledged, unacknowledged, closed, owned, declined, or prioritized. A note is a list of strings that contains information such as the timestamp, owner, and note content. The following table lists the parameters that are displayed as inputs for the function. After execution, the note is displayed on the Event Details page.

Important

We recommend that you use this function after enriching the event status by using an Enrich action. If you enrich the event status to ASSIGN_TO, ensure that you assign an owner for the event by using an Enrich action.

Input


InputTypeDescription
1Operation nameENUM

Indicates the following event operations:

  • Assign
  • Acknowledge
  • Unacknowledge
  • Take ownership
  • Decline ownership
  • Set priority
  • Close
2NoteString

Inserts a note that you want to include in the event.

We recommend a character limit of 256 characters.

Important

If you want to specify a comma in the note content, use the backslash (\) character before the comma.

You can specify slot placeholders for this input; for example, %msg%,%severity%.
When the policy is applied, the slot names in the existing or incoming events are replaced with appropriate slot values (not slot display values) from the incoming event.

You can manually specify variables for this input; for example, $dbname, $tablespace. When the policy is applied, the variable names are replaced with the variable values that you have configured in the policy workflow.

To understand a use case for this function, see Example: Add operation note for event assignment.


AddNote

This function adds a note in an incoming or existing event. The following table lists the parameters that are displayed as inputs for the function. The owner of the note is set to the event policy name. After execution, the note is displayed on the Event Details page. 

Input


InputTypeDescription
1NoteString

Inserts a note that you want to include in the event.

We recommend a character limit of 256 characters.

Important

If you want to specify a comma in the note content, use the backslash (\) character before the comma.

You can specify slot placeholders for this input; for example, %msg%,%severity%.
When the policy is applied, the slot names in the existing or incoming events are replaced with appropriate slot values (not slot display values) from the incoming event.

You can manually specify variables for this input; for example, $dbname, $tablespace. When the policy is applied, the variable names are replaced with the variable values that you have configured in the policy workflow.

To understand a use case for this function, see Example: Add notes to incoming events to indicate event generation.


SetNote

This function modifies the note content for a specific note from a list of notes in an incoming or existing event. After execution, the modified note is displayed on the Event Details page. 

Important

You can modify only the text of the note but not the author and timestamp of the note.

Input


InputTypeDescription
1PositionInteger

The sequence number of the note that you want to modify.

Notes are numbered, starting from 1 for the oldest note. To modify the most recent note, specify the position as 0.

If you specify an incorrect position, an exception message is displayed in the _errors slot for the event.

2NoteString

The new text of the note that you want to set in the existing note of the event.

We recommend a character limit of 256 characters.

Important

If you want to specify a comma in the note content, use the backslash (\) character before the comma.

You can specify slot placeholders for this input; for example, %msg%,%severity%.
When the policy is applied, the slot names in the existing or incoming events are replaced with appropriate slot values (not the slot display values) from the incoming event.

You can manually specify variables for this input; for example, $dbname, $tablespace. When the policy is applied, the variable names are replaced with the variable values that you have configured in the policy workflow.

To understand a use case for this function, see Example: Retrieve and modify notes in incoming events.


LookupNodeDetails

This function fetches node details, such as node IP address, source, location, and so on, from BMC Discovery according to the Node ID (_node_id)slot and the topology lookup slots for an event class present in the incoming event. The fetched node details can further be used to enrich events. This function returns String or List of String node attribute values.

Important

  • This function can be used only once and we recommend using it at the start of the policy workflow.
  • If the _node_id value is empty for an event, the event enrichment is skipped and the _errors slot in the event is populated with the reason for failure.

Input


InputTypeDescription
1Node Attributes to fetchList

Comma-separated list of node attributes that you want to fetch from BMC Discovery . To refer to node attributes in BMC Discovery , run the GET/data/nodes/{node_id} endpoint by using the _node_id value present in an existing event. 

For more information, see Endpoints in the REST API. Open link

The state attribute returned in the API response contains the node attribute details that you could specify for this input.

{
  "destroyed": false,
  "kind": "Host",
  "modified": "2022-02-09T07:41:09.342211+00:00",
  "state": {
    "__all_dns_names": [
      "hostA.bmc.com"
    ],
    "__all_ip_addrs": [
      "<IP_address>",
      "fe80::250:56ff:feab:648a"
    ],
    "__all_mac_addrs": [
      "<Mac_address>"
    ],
    "__package_checksum": "m93tWP6dsxzyrPgqDgmWig==",
    "__patch_checksum": "11FxOYiYfpMxmANj4kGJzg==",
    "_tw_meta_data_attrs": [
      "cpe_string",
      "cpe_string_23",
      "cpe_id"
    ],
    "access_failure_count": 0,
    "age_count": 3,
    "cdm_virtual_system_type": 4,
    "cores_per_processor": 1,
    "cpe_id": "",
    "cpe_string": "cpe:/o:novell:suse_linux:11",
    "cpe_string_23": "cpe:2.3:o:novell:suse_linux:11:*:*:*:*:*:*:*",
    "cpu_resource_type": "VIRTUAL",
    "cpu_threading_enabled": false,
    "dns_domain": "bmc.com",
    "host_type": "UNIX Server",
    "hostname": "hostA",
    "kernel": "2.6.32.59-0.19.1.14514.1.PTF-default",
    "key": "hCNMEDtfRcF7pUWzPxX8vw==",
    "last_access_response": "Successful access",
    "last_update_failure": null,
    "last_update_success": "2021-01-18T17:47:20.377012+00:00",
    "local_fqdn": "hostA.bmc.com",
    "logical_ram": 15956,
    "model": "VMware Virtual Platform",
    "name": "aio-hostA",
    "new_endpoint_identity_count": 0,
    "no_response_count": 0,
    "num_cores": 2,
    "num_logical_processors": 2,
    "num_processors": 2,
    "nvd_url_part": "cpe%3A%2Fo%3Anovell%3Asuse_linux%3A11",
    "os": "SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 1",
    "os_arch": "x86_64",
    "os_class": "UNIX",
    "os_type": "SuSE Linux",
    "os_vendor": "Novell",
    "os_version": "11",
    "package_count": 857,
    "patch_count": 0,
    "processor_speed": 2199,
    "processor_type": "Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz",
    "processor_vendor": "Intel Corporation",
    "service_pack": 1,
    "threads_per_core": 1,
    "type": "UNIX Server",
    "vendor": "VMware, Inc.",
    "virtual": true,
    "vm_class": "VMware"
  }
}

The attributes can be specified by using standard JSON path conventions. For example, the following attribute list can be used to retrieve node attributes:

["kernel", "os", "model", "kind", "__all_ip_addrs[0]"]

After the attributes are fetched, you can use these attributes as local variables in the function input by using the $NODE prefix to further enrich events. For example, $NODE. kernel and $NODE.os.

Important

Make sure that you provide the node attribute name as present in BMC Discovery . If you provide an attribute name for which there is no value present in BMC Discovery , the variable name is set as the variable value in the enriched event. For example, assuming that the kernel value is not present in BMC Discovery , the detailed message slot is set to $NODE. kernel in the enriched event instead of the actual value and the _errors slot in the event is populated with the reason for failure.

To understand a use case for this function, see Example: Enrich events with node details.

Return functions

Return functions are also known as non-void functions and return a value. Return functions are further classified into the following categories:

  • String functions
  • List functions
  • Number functions

For an Enrich action, the functions list displays function based on the data type of the slot that you enrich as shown:

Data type of slotsReturn functions available

String

Displays functions that return either a String, Number, or Boolean value.

List of stringDisplays functions that return a List of string value.
NumberDisplays functions that return a Number value.
For an Enrich or Variable action, the function parameters display slots based on the data type of the function parameter as shown:
Data type of parametersSlots available

String

Displays slots that have either the String, Number, or Boolean data types.

List of stringDisplays slots that have the List of String data type.
NumberDisplays slots that have the Number data type.

Tip

In the following functions, in the Text String field, you can do one of the following:

  • Specify raw text
  • Select a slot
  • Select an already defined variable.
    The variable needs to be already defined in the policy workflow, before the action under which you are adding the function.

String functions

These functions are used for string manipulation operations such as concatenating strings, replacing strings, and so on. These functions use slots or variables with a string value.

Concat

Concatenates two text strings to return a new string.

Input

InputTypeDescription
Text String 1String

A single text string, slot (with a string value) or variable (with a string value) that you want to join.

Enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

Text String 2String

A single text string, slot (with a string value) or variable (with a string value) that you want to join to the earlier string value.

Enclose values containing blank spaces or other special characters in double quotes

Maximum limit is 1024 characters. 


Expected output

Expected outputType
Result of concatenating the specified stringsString

Example

Input 1= Hello World

Input 2=[tagName1,tagName2,tagName3]

Output=Hello World[tagName1,tagName2,tagName3]


ConcatList

Concatenates a list of comma-separated strings using the given separator and returns a new string.

Input

InputTypeDescription
Text StringList of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values), that you want to join.

You cannot specify a combination of text strings, slots with string values, and variables with string values.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

SeparatorString

Alphanumeric or special character(s) by which you want to separate the new string.

Providing the separator is optional.

Important

Use two backslashes (\\) as the separator instead of a single backslash (\) because it might cause a policy failure.

Expected output

Expected outputType
Concatenated string by combining the specified comma-separated list of stringsString

Example

Input 1= [tagName1,tagName2,tagName3]

Input 2= -

Output=tagName1-tagName2-tagName3


Contains

Detects whether a text string contains a substring. 

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value)in which you want to search.

Search is case insensitive.

Maximum limit is 1024 characters. 

Find SubstringString

Substring that you want to find in the text string.

Returns true if the substring is found, otherwise returns false.

Expected output

Expected outputType
Indicates whether the substring is present in the specified string.Boolean

Example

Input 1=v1v4v5v6

Input 2=v4

Output=true


CurrentFormattedTimeStamp

Returns the current timestamp with the date in the specified date format and the time zone in UTC. Use this function to enrich slots that have the string data type.

Important

Make sure that you enrich slots that have String as the data type because the function returns a formatted text value for the current timestamp.

Input

InputTypeDescription
Date FormatString

Specify a date format as a string in which you want to retrieve the current timestamp.

This function supports the standard date formats. Refer to the following table for a few date format examples:

Date formatDescriptionExample
EEE, MMM d, "yy

E: Day name in a week

M: Month in a year

d: Day in a month

y: Year
Sun, May 15, ’22
h:mm a

h: Hour in AM or PM in the 12-hour format

m: Minute in an hour

a: AM or PM indicator
12:15 PM
hh 'o"clock'a, zzzz

h: Hour in AM or PM in the 12-hour format

a: AM or PM indicator

z: Time zone
12 o'clock PM, Pacific Daylight Time

Expected output

Expected outputType
Timestamp in the specified date format and the UTC time zoneString

Example

Input =EEE, MMM d,  “yy

Output=Wed, Dec 29, '21

To understand a use case for this function, see Example: Retrieve the timestamp as a date format.


GetPosition

Returns the position of the first character of the first occurred substring, reading left to right.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value)in which you want to find the substring.

Maximum limit is 1024 characters. 

Find SubstringString

Substring that you want to find in the text string.

Returns 0 if the substring is not found.

Expected output

Expected outputType
Position of the specified substringInteger

Example

Input 1=GetPosition v3 cool

Input 2=cool

Output=16


GetPositionOnOccurrences

If the substring occurred for the given number of times, this function returns the position of the first character of the final substring based on the number of occurrences specified, reading left to right. 

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value) in which you want to find the substring.

Maximum limit is 1024 characters. 

Find SubstringString

Substring that you want to find in the text string.

Returns 0 if the substring is not found.

Number of OccurrencesInteger

Number of occurrences of the substring that you want to find.

Returns 0 if the specified number is not found.

Expected output

Expected outputType
Position of the specified substring based on occurrencesInteger

Example

Input 1=city reno is called reno

Input 2=reno

Input 3=2

Output=21


MatchRegex

Matches a text string with a simple regular expression.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value)to use for matching.

Maximum limit is 1024 characters. 

Regex PatternStringRegular expression pattern to match with the text string.

Expected output

Expected outputType
Indicates whether the string matches the regular expressionBoolean

Example

Input 1=aaabbb

Input 2=a*b*

Output=true


Replace

Replaces part of a text string with another string.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value)in which you want to replace a substring.


Maximum limit is 1024 characters. 

Existing SubstringString

Existing substring that you want to replace in the text string.

New SubstringStringNew substring with which you want to replace the existing substring.

Expected output

Expected outputType
New string created as a result of the replacementString

Example

Input 1= Hello World

Input 2=World

Input 3=User

Output=Hello User


Split

Splits a text string into a list of substrings based on the separator occurring in the string.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value) that you want to split.

Maximum limit is 1024 characters. 

SeparatorString

Separator character(s) in the text string at which you want to split the string.

The separator character(s) are not included in the resulting value.

Important

Use two backslashes (\\) as the separator instead of a single backslash (\) because it might cause a policy failure.

Expected output

Expected outputType
List of substrings divided by the specified separatorString

Example

Input 1= Hello World

Input 2=" " 

Output=[Hello, World]


StringLength

Returns the number of characters in a text string.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value) whose length you want to find.

Maximum limit is 1024 characters. 

Expected output

Expected outputType
String length (in characters)Integer

Example

Input 1=HELLO WORLD

Output= 11


StringMatch

Matches character patterns in a text string and extracts fields from it. The pattern can contain literal text and substitutes.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value) to use for matching.

Maximum limit is 1024 characters. 

Match PatternString

Pattern to match the string.

The pattern can contain literal text and substitutes. Literal text is matched literally. A substitute is preceded by a % sign, followed by a type indicator.

The values corresponding to the substitutes are extracted as fields.

Valid values for substitutes:

  • %%: literal match of %
  • %d: decimal integer number
  • %f: floating point real number
  • %c: single character
  • %s: string value

Notes:

  • Two substitutes cannot occur without literal text in between them.

  • The portion of the input that matches the substitute of %s depends on the pattern following the substitute:
    • a literal: input up to the first literal.
    • a space and a literal: input up to the space followed by the literal.
    • a space and a substitute: input up to the first space.

Expected output

Expected outputType
Retrieved fieldsList of string

Example

Input 1=Hello World 2021

Input 2=Hello %s %d

Output=[World,2021]


StringToInteger

Converts a text string that represents a number to an integer value. 

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value) that you want to convert.

Maximum limit is 1024 characters. 

Expected output

Expected outputType
Conversion result, returned as an integerInteger

Example

Input 1=20

Output=20


StringToReal

Converts a text string that represents a real number to a real number. 

Input

InputTypeDescription
Text StringString

Text string or reference to a slot or variable (with a real number value) that you want to convert.

Maximum limit is 1024 characters. 

Expected output

Expected outputType
Conversion result, returned as a real valueReal

Example

Input 1=10.2

Output=10.2


Strip

Removes leading and trailing blank spaces from a text string.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value)from which you want spaces removed.

Maximum limit is 1024 characters. 

Expected output

Expected outputType
Resulting string after the blank spaces are removedString

Example

Input 1=space " (provided without the double quotes)

Output=space


Substring

Returns part of a text string based on the given starting position and length.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value)from which you want to extract the substring.

Maximum limit is 1024 characters. 

Start PositionInteger

Position of the character from where you want to begin extraction.

The first character in the text string starts at 1.

LengthIntegerNumber of characters that you want to extract. 

Expected output

Expected outputType
Retrieved stringString

Example

Input 1=HELLO WORLD

Input 2=1

Input 3=5

Output=HELLO


SubstringOnPositions

Returns part of a text string between the start and end positions.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value)from which you want to extract the substring.

Maximum limit is 1024 characters. 

Start PositionInteger

Position of the character from where you want to begin extraction.

The first character in the text string starts at 1.

End PositionInteger

Position of the character where you want to end extraction.

The first character in the text string starts at 1. 

Expected output

Expected outputType
Retrieved stringString

Example

Input 1= Hello World

Input 2=3

Input 3=6

Output=llo (includes the space character at the end)


SubstringOnStartPosition

Returns part of a text string starting from the given start position to the end of the string.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value)from which you want to extract the substring.

Maximum limit is 1024 characters. 

Start PositionInteger

Position of the character from where you want to begin extraction. The first character in the text string starts at 1.

Expected output

Expected outputType
Retrieved stringString

Example

Input 1= Hello World

Input 2=3

Output=llo World


ToLowerCase

Converts all letters in a text string to lower case.

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value) that you want to convert.

Characters that are not letters are not changed.

Maximum limit is 1024 characters. 

Expected output

Expected outputType
Lower case version of the specified string.String

Example

Input 1= Hello User

Output=hello user


ToUpperCase

Converts all letters in a text string to upper case. 

Input

InputTypeDescription
Text StringString

Text string, slot (with a string value) or variable (with a string value) that you want to convert.

Characters that are not letters are not changed.

Maximum limit is 1024 characters. 

Expected output

Expected outputType
Upper case version of the specified stringString

Example

Input 1= Hello User

Output=HELLO USER


List functions

These functions are used for list manipulation operations such as determining the list length, retrieving an element from the list, and so on. These functions use slots or variables with string values. 

You can specify a list by using one of the following formats:

  • [listValue1,listValue2,listValue3]
  • ["listValue1","listValue2","listValue3"]

Important

  • [] is considered as an empty list.
  • Enclose list values that contain blank spaces or other special characters in double quotation marks.

ConcatListToList

Concatenates two lists of comma-separated strings to return a new list.

Input

InputTypeDescription
List 1List of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values), that you want to join.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

List 2List of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values), that you want to join to the earlier list.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

Expected output

Expected outputType
Result of concatenating the specified listsList of string

Example

Input 1=[abc,def,ghi]

Input 2=[123,456,789]

Output=[abc,def,ghi,123,456,789]


GetNote

Returns a note present in the given position in a list of notes in the incoming event. A note is a list of strings that contain information like the timestamp, owner, and the note content.

Input

InputTypeDescription
PositionInteger

The sequence number of the note that you want to retrieve. The position starts from 1 for the oldest note.

To retrieve the most recent note, specify the position as 0.

If you specify an incorrect position, an exception message is displayed in the _errors slot for the event..

Expected output

Expected outputType
The retrieved noteList of string

Example

An incoming event has the following list of notes:

[0x17cbca212fd,admin,BASIC_ENRICHMENT,0x17cbca212fd,admin,ADVANCED_ENRICHMENT,0x17cbca212fd,admin,NOTIFICATION]

Input= 2

Output[0x17cbca212fd,admin,ADVANCED_ENRICHMENT]

To understand a use case for this function, see Example: Retrieve and modify notes in incoming events.


IsDisjoint

Compares elements of two lists to verify that no common elements exist between them.

Input

InputTypeDescription
List 1List of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values) that you want to compare.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

List 2List of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values) that you want to compare with the earlier list.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

Returns true is no common elements exist, otherwise returns false.

Expected output

Expected outputType
Indicates that no common elements exist in the specified lists,Boolean

Example
Example 1:
  • Input 1=[123,111Input1,def,ghi]
  • Input 2=[456,789,abc]
  • Output=true (because no common elements are present in the two lists)
Example 2:
  • Input 1=[123,111,456]
  • Input 2=[456,789]
  • Output=true (because common elements are present in the two lists)


ListContains

Detects whether a list contains an element.

Input

InputTypeDescription
ListList of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values) in which you want to search.

Search is case insensitive.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

Find ElementString

Element that you want to find in the list.

Returns true if the element is found, otherwise returns false.

Expected output

Expected outputType
Indicates whether the element is present in the specified list.Boolean

Example

Input 1=[v1,v2,v3,v4,v5,v6,v3,v2]

Input 2=v1

Output=true


ListGetElement

Returns the element present in the given position in a list, reading left to right.

Input

InputTypeDescription
ListList of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values) in which you want to find the element.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

PositionInteger

Position of the element, reading left to right. The first element in the list starts at 1.

Expected output

Expected outputType
Element present at the specified position in the list.String

Example

Input 1=[oxford,cambridge,london]

Input 2=2

Output=cambridge


ListIntersect

Compares two lists to return the common elements between them.

Input

InputTypeDescription
ListList of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values) that you want to compare.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

ListList of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values) that you want to compare with the earlier list.

Enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

Expected output

Expected outputType
Common elements present in the two listsList of string

Example

Input 1=[html,css,javascript]

Input 2=css

Output=css


ListLength

Returns the number of elements in a list.

Input

InputTypeDescription
ListList of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values), whole length you want to find.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes.

Maximum limit is 1024 characters. 

Expected output

Expected outputType
List length (in characters)Integer

Example

Input 1=[html,css,javascript]

Output=3


ListUnion

Returns a union of all unique values between the two lists.

Duplicate values between the two lists are repeated only once. Duplicate values within a single list are retained.

Input

InputTypeDescription
List 1List of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values), that you want to combine.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

List 2List of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values), that you want to combine with the earlier list.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

Expected output

Expected outputType
Union of the specified listsList of string

Example

Input 1=[bmc,ade]

Input 2=[bmc,helix]

Output=[bmc,ade,helix]


RemoveDuplicateElements

Removes duplicate elements from a list.

Input

InputTypeDescription
ListList of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values) containing duplicate elements.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

Expected output

Expected outputType
Resulting list after the duplicate elements are removed.List of string

Example

Input 1=[v1,v2,v3,v4,v5,v6,v3,v2]

Output=[v1,v2,v3,v4,v5,v6]


RemoveElement

Removes all occurrences of an element from a list.

Input

InputTypeDescription
ListList of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values), from which you want to remove an element.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

Remove ElementStringElement that you want to remove from the list. 

Expected output

Expected outputType
Resulting list after the specified element is removed.List of string

Example

Input 1=[abc,def,ghi,jkl,mnp]

Input 2=def

Output=[abc,ghi,jkl,mnp]


RemoveElementList

Removes a list of elements from a list.

Input

InputTypeDescription
ListList of string

Comma-separated list of only text strings, only slots (with string values), or only variables (with string values), from which you want to remove elements.

Enclose the list in square brackets and enclose values containing blank spaces or other special characters in double quotes. 

Maximum limit is 1024 characters. 

Remove Element ListList of stringComma-separated list of elements occurring in the list that you want to remove. 

Expected output

Expected outputType
Resulting list after the specified list is removed.List of string

Example

Input 1=[v1,v2,v3,v4,v5,v6]

Input 2=[v2,v3]

Output=[v1,v4,v5,v6]


Number functions

These functions are used for integer manipulation operations such as integer addition, subtraction, and so on.

CurrentTimeStamp

Returns the current timestamp in epoch (milliseconds). This function does not require any input parameter. Use this function to enrich slots having the number data type.

Important

Make sure that you enrich slots that have Number as the data type because the function returns the current timestamp value in milliseconds.

Expected output

Expected outputType
Timestamp value in millisecondsNumber
For example, if the current data and time is Wednesday, December 29, 2021 12:03:42 PM GMT+05:30, then the function returns the timestamp as 1640759622000 milliseconds.

To understand a use case for this function, see Example: Check whether there is a time delay between events.


Math

Performs basic mathematical operations on two numbers and returns the result. 

Input

InputTypeDescription
OperatorString

Arithmetic operator to use for the calculation.

Valid values are: +,-,*, /

Number 1Integer

First number to use for the calculation.

Number 2IntegerSecond number to use for the calculation.

Expected output

Expected outputType
Resulting value of the mathematical operation performed.Integer

Example

Input 1=+

Input 2=5

Input 3=7

Output=12





Was this page helpful? Yes No Submitting... Thank you

Comments