Dynamic expressions for configuration


In Smart IT, administrators can build dynamic expressions to configure on-screen fields and provider actions. This topic provides details and examples of the dynamic expressions.

Operators

Operator

Definition

Example

&&

logical AND

$status == 'In Progress' && $priority == 'High'

Operator_&&.gif

||

logical OR

$customerVIPFlag || $serviceType == "User Service Request"

Operator_UserServiceRequest.gif

==

equal to

$firstName == "Allen" || $bmcInt == 10

Operator_EqualTo.gif

!=

Not equal to

$status != 'New'

!

Not

!($status == "Draft")

>

greater than

$bmcInt > 6

> =

greater than or equal to

$bmcInt >= 6

<

lesser than

$bmcInt < 6

< =

lesser than or equal to

$bmcInt <= 6

+

context specific either addition of numerals or concatenation of strings

$bmcInt + 10

$staus + " " + $priority

( expression ) ? consequent value expression  : alternate value expression

conditional expression**

 

$status == 'Assigned') ? "Hello" : "World"

Operator_Status_Assigned_Hello_World.gif

In Smart IT Universal client, single and multiple conditional operators are supported.

For Example :

  • (expression) ? consequent value expression : alternate value expression
  • (expression) ? ((expression) ? consequent value expression : alternate value expression) : alternate value expression
  • (expression) ? consequent value expression : ((expression) ? consequent value expression : alternate value expression)
  • (expression) ? ((expression) ? consequent value expression  : alternate value expression) : ((expression) ? consequent value expression  : alternate value expression)

However, in Smart IT mobile apps, multiple conditional operators are not supported. Only single conditional operators are supported in Smart IT mobile apps.

()

grouping

 

LIKE

container check

"AB" LIKE "ABCD"

Note: Wildcard characters like %, ?, * etc. are not supported.

*, /, %, -

Mathematical operations

 

Warning

Important

If you use a field name that has a hyphen in a dynamic expression, you must enclose it in single quotes. For example:

('$Test-Field' ==$NULL$)?1:'$Test-Field'.

Keywords

Keywords

Description

Value

$NULL$

Keyword_Null.gif

A null value (no value).

$NOW$

This keyword replaces $TIMESTAMP$

UNIX epoch time

$HOMEURL$

This keyword returns the base URL of the current page

String

$MIDTIERURL$

This keyword returns the URL for midtier

String

$USER$

This keyword returns login id of the current user. Example:Keyword_Users.gif

String

Functions

Functions

Description

Return value

INGROUP

This function verifies if the user belongs to a support group. It takes strings as input.

Example:

Make field readonly if Incident Master (group id: 20004)

CustomField1 - readonly - Meet a condition - INGROUP(20004)

INGROUP.png

boolean

HASROLE

This function checks if user has a role. It takes strings as input.

Example:

Hide a field if user is not Incident Submitter (role id: -20042)

CustomField1 - hide - Meet a condition - !HASROLE(-20042)

HASROLE.png

boolean

REPLACE

This function returns the value that results from replacing any occurrences of the second parameter found in the first parameter along with the contents of the third parameter.

For example:

REPLACE ($submitter, 'Bob', 'Robert').

string

DATEADD

This function adds a specified number of days, weeks, months, or years to the date and returns the new date. You can specifiy datepart using one of the following quoted values:

  • Year --"years " or "y "
  • Month --"months " or "m"
  • Day --"days " or "d"
  • Week --"weeks " or "w"
  • Hour--"hours" or " h"
  • Minute--"minutes" or "mn"
  • Second--"seconds" or "s"
  • Millisecond – "milliseconds" or "ms"

The date value that can be added is the date parameter. For example, to add 10 weeks to the 05/20/02 date, enter:

DATEADD(string, integer, string)

e.g. DATEADD('w', 10, '05/20/08'), DATEADD('M', 1, '1504716711965')

Function_Dateadd.gif

date

DATEDIFF

Depending on the value of datepart, this function returns the difference between the start date and the end date. You can specify datepart using one of the following quoted values:


    • Year --"years " or "y "
    • Month --"months " or "m"
    • Day --"days " or "d"
    • Week --"weeks " or "w"
    • Hour--"hours" or " h"
    • Minute--"minutes" or "mn"
    • Second--"seconds" or "s"
    • Millisecond – "milliseconds" or "ms"

For example:

DATEDIFF('d', $date1, $date2)

int

NOOP

Does nothing (in Universal client), sets blank value (in mobile apps).

Example:

(Universal client) When Status is Assigned, set the value of Zip/ Postal Code field to 560010, else do nothing 

(Mobile apps) When Status value is Assigned, set the value of Zip/ Postal Code to 560010. If  Status value is not Assigned, set the value of Zip/ Postal Code as blank.

NOOP_Example.jpg

void (UC)

blank (mobile apps)

 

SELECTIONINDEX

Select the index value of menu field.

Example: SELECTIONINDEX($workOrderType) returns 1000.

ID.gif

Index value of the Enum Field

SELECTIONLABEL

Select the label value of menu field.

Example: SELECTIONLABEL($workOrderType) returns Proyecto for Spanish locale and Project for English locale.

Label.gif

Alias values of Enum Field which is localized

ISREQUIRED

The condition is triggered based on the value of the required property of a field.

Example: ISREQUIRED($status).

 

ISREADONLY

The condition is triggered based on the value of the read-only property of a field.

Example: ISREADONLY($status).

 

ISHIDDEN

The condition is triggered based on the value of the visibility property of a field.

Example: ISHIDDEN($status).

 

ONCHANGE

The condition is triggered when the field value is changed.

Example: ONCHANGE($status).

Note: This function is supported in Provider Action configuration only.

 

 

Other available operands

You can specify ticket object items for both default and custom fields. Examples include: $status, $isCustomVIP, $desc

You can specify constant values. Examples includes strings like 'ABC' ,Boolean true or false, Numbers, '' or NULL.

Incident screen details

Widget name

Widget member name

Accelerator name

assignee

Assignee

assignee

 

Assignee Login ID

assigneeLoginId

assigneeSupportGroups

Assigned Group

supportGroups

 

Assigned Group ID

assignedGroup

Customer

First Name

firstName

 

Last Name

lastName

 

VIP

customerVIPFlag

 

Customer Login ID

customerLoginId

 

Person ID

customerPersonId

contact

Direct Contact First Name

contactFirstName

 

Direct Contact Last Name

contactLastName

 

Direct Contact Organization

contactOrganization

 

Direct Contact Login ID

contactLoginId

 

Direct Contact Company

contactCompany

causalCI

HPD_CI

causalCI

 

HPD_CI_ReconID

CI_reconid

customerPhone

Phone Number

phoneNumber

contactPhone

Direct Contact Phone Number

contactPhoneNumber

contactEmail

Direct Contact Internet E-mail

contactEmail

customerEmail

Internet E-mail

internetEmail

desc

Detailed Decription

desc

incidentTemplate

HPD Template ID

templateId

impactedService

ServiceCI

impactedService

 

ServiceCI_ReconID

serviceCIReconId

locationCompany

Company

locationCompany

operational

Categorization Tier 1

operationCategoryTier1

 

Categorization Tier 2

operationCategoryTier2

 

Categorization Tier 3

operationCategoryTier3

organization

Organization

organization

priority

Priority

priority

 

Impact

impact

 

Urgency

urgency

product

Product Categorization Tier 1

productCategoryTier1

 

Product Categorization Tier 2

productCategoryTier2

 

Product Categorization Tier 3

productCategoryTier3

 

Product Name

productName

 

Product Model/Version

productModelVersion

resolution

Resolution Category

resOperationCategoryTier1

 

Resolution Category Tier 2

resOperationCategoryTier2

 

Resolution Category Tier 3

resOperationCategoryTier3

resolutionProduct

Closure Product Category Tier1

resProductCategoryTier1

 

Closure Product Category Tier2

resProductCategoryTier2

 

Closure Product Category Tier3

resProductCategoryTier3

 

Closure Product Name

resProductName

 

Closure Product Model/Version

resProductModelVersion

status

Status

status

 

Status_Reason

statusReason

 

Resolution

resolution

serviceType

Service Type

serviceType

site

Site

site

 

Region

region

 

Site Group

siteGroup

Default field name

Accelerator name

Contact Company

company

Description

summary

Incident Number

id

Warning

Note

All the widgets and fields listed in the table may not be available in both View and Create screens.

Change screen details

Widget name

Widget member name

Accelerator name

actualDates

Actual Start Date

actualStartDate

 

Actual End Date

actualEndDate

changeLocation

Site

siteName

 

Site Group

siteGroup

 

Region

siteRegion

changeCoordinator

ASCHG

assigneeName

 

ASLOGID

assigneeLoginId

changeCoordinatorSupportGroups

ASGRP

assigneeGroup

 

ASGRPID

assigneeGroupId

changeManager

CAB Manager ( Change Co-ord )

managerName

 

CAB Manager Login

managerLoginId

 

Company3

managerCompany

changeManagerSupportGroups

Support Group Name

managerGroup

 

Support Group ID

managerGroupId

changeRiskBadge

Risk Level

riskLevel

changeRisk

Risk Level

riskLevel

customerPhone

Customer Phone Number

customerPhone

customerEmail

Customer Internet E-mail

customerEmail

changeClass

Change Timing

timing

 

Timing_Reason

timingReason

desc

Detailed Description

desc

impactedAreas

Company

requestedByCompany

 

Site

siteName

 

Region

siteRegion

 

Site Group

siteGroup

 

Organization

contactOrganization

 

Department

contactDepartment

impactedService

ServiceCI

impactedService

operational

Categorization Tier 1

operationCategoryTier1

 

Categorization Tier 2

operationCategoryTier2

 

Categorization Tier 3

operationCategoryTier3

priority

Priority

priority

 

Impact

impact

 

Urgency

urgency

product

Product Cat Tier 1

productCategoryTier1

 

Product Cat Tier 2

productCategoryTier2

 

Product Cat Tier 3

productCategoryTier3

 

Product Name (2)

productName

 

Product Model/Version (2)

productModelVersion

requestedFor

Customer First Name

customerFirstName

 

Customer Last Name

customerLastName

 

Customer Department

customerDepartment

scheduledDates

Scheduled Start Date

scheduledStartDate

 

Scheduled End Date

scheduledEndDate

status

Change Request Prev Status

previousStatus

 

Status Reason

statusReason

targetDate

Change Target Date

targetDate

Field name

Accelerator name

Description

summary

Infrastructure Change ID

displayId

Reason For Change

changeReason

Reason For Change

changeReason

Warning

Note

All widgets and fields listed above may not be available in the both View and Create screens.

Work Order screen details

Widget name

Widget member name

Additional information

assigneeName

assigneeName

 

 

assigneeLoginId

 

assigneeSupportGroups

assigneeGroup

 

 

assigneeGroupId

 

 

assigneeCompany

 

 

assigneeOrg

 

actualDates

actualStartDate

 

customer

customerFirstName

 

 

customerLastName

 

 

customerVIPFlag

 

 

customerLoginId

 

 

customerPersonId

 

 

customerCompany

 

customerPhone

customerPhone

 

customerEmail

customerInternetEmail

 

contact

contactFirstName

 

 

contactLastName

 

 

contactOrg

 

 

contactLoginId

 

 

contactCompany

 

contactPhone

contactPhone

 

contactEmail

contactInternetEmail

 

desc

desc

 

impactedService

impactedService

 

 

serviceCIReconId

 

organization

customerOrg

 

operational

operationCategoryTier1

Operational Category

 

operationCategoryTier2

 

 

operationCategoryTier3

 

product

productCategoryTier1

Product Category

 

productCategoryTier2

 

 

productCategoryTier3

 

priority

priority

 

requestManager

managerName

 

 

managerLoginId

 

requestManagerSupportGroups

managerGroup

 

 

managerGroupId

 

 

managerCompany

 

 

managerOrg

 

scheduledDates

scheduledStartDate

 

 

scheduledEndDate

 

status

status

 

 

statusReason

 

site

locationRegion

Customer Site

 

locationSiteGroup

 

 

locationSite

 

workorderTemplate

templateId

 

 

templateName

 

 

id

 

workOrderLocation

 

Google Map

Widget name

Required

Read-only

Hide

Set value

Affected service 

Yes

Yes

Yes

Not allowed

Assignee 

Yes- Assignee Name

Yes

Yes

Not allowed

Actual Dates

Yes

Yes

Yes

 

Customer Name

Yes - Customer Name

Yes

Yes

Not allowed

Categories

Yes - Tier 1

Yes

Yes

Not allowed

Description with attachment(s)

Yes - Desc

Yes

Yes

Yes - Desc

Email

Yes

Yes

Yes

Yes

Manager

Yes

Yes

Yes

Not allowed

Manager Support Group

Yes

Yes

Yes

Not allowed

Phone

Yes

Yes

Yes

Yes

Priority

Yes

Yes

Yes

Yes

Site 

Yes- site field

Yes

Yes

Not allowed

Support group 

Yes- Support

Yes

Yes

Not allowed

Status

Yes

Yes

Yes

Yes

Status Reason

Yes

Yes

Yes

Yes

Scheduled Dates

Yes

Yes

Yes

 

Title

Yes

Yes

Yes

Yes

Work Order id

 

 

Yes

 

Warning

Note

All widgets and fields listed above may not be available in the both View and Create screens.

Task screen details

Widget name

Widget member name

assignee

assigneeLoginId

 

assigneeName

actualDates

actualStartDate

 

actualEndDate

desc

desc

operational

operationCategoryTier1

 

operationCategoryTier2

 

operationCategoryTier3

priority

priority

product

productCategoryTier1

 

productCategoryTier2

 

productCategoryTier3

 

productName

 

productModelVersion

status

taskStatus

 

taskStatusReason

 

summary

scheduledDates

scheduledStartDate

 

scheduledEndDate

supportGroups

assigneeSupportGroupId

 

assigneeGroup

 

assigneeCompany

 

assigneeOrg

taskTemplate

templateGuid

Widget name

Required

Read-only

Hide

Set value

Assignee 

Yes - Assignee Name

Yes

Yes

Not allowed

Actual Dates

Yes

Yes

Yes

 

Categories

Yes - Tier 1

Yes

Yes

Not allowed

Description with attachment(s)

Yes - Desc

Yes

Yes

Yes - Desc

Priority

Yes

Yes

Yes

Yes

Support group 

Yes - Support

Yes

Yes

Not allowed

Status

Yes

Yes

Yes

Yes

Status Reason

Yes

Yes

Yes

Yes

Scheduled Dates

Yes

Yes

Yes

 

Task id

 

 

Yes

 

Title

Yes

Yes

Yes

Yes

Warning

Note

All widgets and fields listed above may not be available in the both View and Create screens.

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Helix ITSM 26.1