Service Manager powered by HEAT

About Using Expressions in Quick Actions

About Using Expressions in Quick Actions

About Using Expressions in Email Fields in Quick Actions

Using an Expression in a Quick Action

Example: Accessing a Record from Notification Emails

Example: Accessing a Survey Emails Record

About Using Expressions in Quick Actions

A quick action can employ full expression syntax, surrounded by $(). For example:

$(FieldName)

$([Problem#]Category)

$(2+2)

The following illustrates an expression defining a quick action:

Using an Expression in a Quick Action

About Using Expressions in Email Fields in Quick Actions

You can include expressions for the To and From fields:

From: Enter an expression to indicate the sender of the email. For example, $(GetGlobal("ListenerEmailAddress")).

To: Enter an expression to indicate the recipient of the email. For example, $(OwnerEmail).

Using an Expression in a Quick Action

From the Quick Action Center, do the following:

1.Do one of the following:

Place your cursor in a field value text box and enter an expression.

Select either the Insert a Field or Insert a Function tab, navigate to an expression, then drag and drop it into the field value text box.

The items under these tabs vary according to the workspace and logged-in role. These items are Ivanti Service Manager expressions that you can drag and drop into a field when configuring a quick action. If these tabs are disabled, you can access them by selecting the magnifying glass or yellow pencil button at the end of a field line.

2.Repeat as needed for each field value. You can place multiple expressions into each field.

3.Click Save.

Example: Accessing a Record from Notification Emails

The syntax for creating a direct link to a record is:

<a href="$(Server_URL())/?Scope=ObjectWorkspace&CommandId=Search&ObjectType=Change%23&CommandData=RecId,%3D,0,$([FRS_Approval#.][Change#.]RecId),string,AND|#">

where:

Server_URL is the function name.

Scope=ObjectWorkspace is the access the specified object workspace from the Ivanti Service Manager web client.

CommandId=Search specifies to search for the specific record in the object workspace.

ObjectType=business_object is the name of the business object in which to search for the record (for example, Change#). Notice in the example URL, the presence of %23, which corresponds in hexadecimal to the "#" character in ASCII.

CommandData=RecId,%3D,0,$([FRS_Approval#.][Change#.]RecId),string,AND|# searches for the record.

For example, if the current record is an FRS_ApprovalVoteTracking record, and you wish to access the grandparent change record via its relationship to FRS_Approval, use the following example expression:

CommandData=RecId,%3D,0,

$([FRS_Approval#.][Change#.]RecId),

string,AND|#

As another example, if the current record is a change record, to access it directly, use the following example expression:

CommandData=RecId,%3D,0,$(RecId),

string,AND|#

The %3D corresponds in hexadecimal to the "=" character in ASCII, and is required as part of the value to the CommandData parameter.

If you are not logged into Ivanti Service Manager, the system prompts you to do so upon clicking the link. Access is dictated by your assigned role.

The following syntax creates a link to access the record from the My Items tab in the Self-Service Portal:

<a href="$(ServerURL())?Scope=SelfService&role=SelfService&CommandId=OpenMyItem&ItemType=FRS_ApprovalVoteTracking&ItemId=$(RecId)">

where

ServerURL() is the name of the function.

Scope=SelfService is to access the Self-Service Portal, via the service owner or Self Service roles.

role=SelfService is the Self Service role.

CommandId=OpenMyItem is the fixed user interface action command to open the My Items tab in the Self-Service Portal.

ItemType=FRS_ApprovalVoteTracking is the approval vote tracking object.

ItemId=$(RecId) is the the specific record identified by its RecID.

Example: Accessing a Survey Emails Record

Note that you need to add the appropriate expression to the incident or service request send survey business rule.

If you have the following raw URL expression (notice that there are no <a> tags surrounding the expression):

$(GetSurveyURL())&amp;survey_name=$(GetSurveyName("DefaultSurveyName"))&amp;customer_id=$(GetApplicationId())&amp;ot=Incident&amp;oid=$(RecId)&amp;page_index=0

Update it with the following expression:

<a href="$(GetSurveyURL())&amp;survey_name=$(GetSurveyName(&quot;DefaultSurveyName&quot;))&amp;customer_id=$(GetApplicationId())&amp;ot=Incident&amp;oid=$(RecId)&amp;page_index=0">Click here to fill out survey</a>

If you have already modified the send email configuration to the friendly URL, it appears as follows:

<a href="$(GetSurveyURL())&amp;survey_name=$(GetSurveyName("DefaultSurveyName"))&amp;customer_id=$(GetApplicationId())&amp;ot=Incident&amp;oid=$(RecId)&amp;page_index=0">Click here to fill out survey</a>

Update it with the following expression to escape the double-quote characters surrounding DefaultSurveyName, as shown:

<a href="$(GetSurveyURL())&amp;survey_name=$(GetSurveyName(&quot;DefaultSurveyName&quot;))&amp;customer_id=$(GetApplicationId())&amp;ot=Incident&amp;oid=$(RecId)&amp;page_index=0">Click here to fill out survey</a>

If you are not logged into Ivanti Service Manager, the system prompts you to do so upon clicking the link. Access is dictated by your assigned role.


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other