HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
1
HP Service Manager 7.x: Advanced
• Service Manager provides a rich developer environment that allows customers to tailor and
configure their system based on their requirements. We provide a forms designer, JavaScript and
native tailoring capabilities
• Base Utilities & Tools:
–
–
–
–
–
–
–
System Definition Utility
Data Dictionary
Data Policy Database Manager
Forms Designer
Format Control
Links
Menus
• Advanced Utilities & Tools:
–
–
–
–
–
–
–
Document Engine
Display Options
Wizards
Alerts and Notifications
Jscript
Global Lists
Load / Unload Utilities
• Legacy Utilities and Tools
–
–
–
–
Macros
Scripts
Validity
Stored Queries
©2009 Hewlett-Packard Development Company, L..P.
2
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
3
HP Service Manager 7.x: Advanced
• The key to DVDs are the properties in the Properties view of Forms Designer that end in the
word “Condition”. A condition placed into a Condition field will be evaluated as data
changes on the form, and the output value of the Condition overrides any value placed in
the corresponding Property.
• DVD alters the presentation of information on a form by altering the properties on form
elements. It does not, however, directly alter data within the record displayed.
©2009 Hewlett-Packard Development Company, L..P.
4
HP Service Manager 7.x: Advanced
• You can access the dep.g form through the Forms Designer. This form demonstrates a
variety of DVD interactions. To use the form as a learning aid:
– Interact with the different fields before entering the design mode to observe DVD functionality.
– Inspect the form in design mode, note the objects and conditional properties used, and observe the
syntax of the DVD statements that generated the functionality observed.
• Note: Variables are used in this sample form because the it is not associated with a table.
You will typically use field names, such as contact.name, in DVD conditional statements, as
most forms will be associated with a table and be concerned with the values of fields in
those records.
©2009 Hewlett-Packard Development Company, L..P.
5
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
6
HP Service Manager 7.x: Advanced
• A Field Comparison is a conditional statement that permits you to specify comparisons of equality
or inequality. In the above example, the Invisible check box sets the value of the $invisible
variable (though use of the Input property). The Visible Condition of the Disable Checkbox text
field causes the field to be visible only when $invisible equals false. That is, the Disable Checkbox
text field is visible when the Invisible checkbox is unchecked, and invisible when the checkbox is
checked.
• Field Comparisons are used for DVD properties that require a Boolean value, such as Visible or
Read Only.
• Field comparison statements:
–
–
–
–
–
–
–
–
–
The first type of conditional statement is a field comparison. Field comparison statements have the following syntax:
FIELD (=|<>) VALUE
where:
FIELD is any variable or file field surrounded by brackets, for example, [$x], [name], and so forth.
VALUE is any quoted string or number.
For example, suppose you want to make a certain field visible only when the category of a ticket equals "network."
Assume that the category can be selected via a drop-down list whose Input is defined as $category. You can specify
the visibility dependency by assigning the following to the “Visible Condition” property of the field:
[$category] = “incident"
Note: Instead of a variable, a drop-down list might use a record field as input. If the field is named "category," you
would then set up the "Visible Condition" as follows:
[category] = “incident"
Note: In addition to a comparison of equality, you can specify an inequality comparison, as in:
[$category] <> “incident" (meaning that the category is not equal to incident)
–
–
–
–
–
Conditions can be complex conditions as well. For example,
[$catgegory]=“incident" & [$subcatgegory]=“hardware"
will be only true if both parts of the condition are true.
[catgegory]=“incident" | [category]=“complaint"
will be true if either part of the condition is met.
–
–
• Complex conditions
©2009 Hewlett-Packard Development Company, L..P.
7
HP Service Manager 7.x: Advanced
• Field Value Matching is a conditional statement that permits you to specify matching output property values for various
input values. It is used for DVD Properties that are looking for strings or numeric values, such as FontIncrease or
Foreground Color.
• Example: Specify the color of the text of a label based on the value of $severity.
• The value to be tested goes before the question mark, the list of possible values to compare against goes between the
question mark and the colon, and the possible output values for the DVD property go after the colon. You can also
specify a value to use if no match is found, so you may have one more output value than possible comparison values.
• Service Manager DVD uses the following color numbers to reference Foreground and Background colors:
•
•
•
•
•
•
0=Black
1=Red
2=Green
3=Blue
4=Gray
5=Light Gray
• Field Value Matching statements
6=Dark Gray
7=Yellow
8=Cyan
9=Magenta
10=White
11=Forest
12=Navy
13=Purple
14=Teal
15=Brick
16=Manila
The second type of statement allowed in a property condition allows you to specify matching output values to various input values.
The syntax is as follows:
FIELD ? ValueList : DisplayList
where:
FIELD is any variable or file field surrounded by brackets, for example, [$x], [name], and so forth.
ValueList and DisplayList are lists of comma-separated values
As an example, suppose you want the color of a label to change based on the value of a severity field. The severity is specified in
an edit field whose input is $severity. You set the Color Condition of the label as follows:
[$severity]? "sev1","sev2","sev3" : 1,7,2
This statement tells the label to do the following:
· Use a color value of 1 (red) when $severity="sev1"
· Use a color value of 7 (yellow) when $severity="sev2"
· Use a color value of 2 (green) when $severity="sev3"
You can also specify a value to use if no match is found. For instance:
[$severity]? "sev1","sev2","sev3" : 1,7,2, 0
This tells the system to use color 0 (black) if $severity is none of the listed "sev" values.
Note again that it is assumed that the $severity field has been assigned as input to at least one field on the screen.
©2009 Hewlett-Packard Development Company, L..P.
8
HP Service Manager 7.x: Advanced
• You can use a select() statement to return all of the subcategories that apply to an already-selected
category.
• The syntax is as follows:
select(return_field, file_name, select_field, select_field_value)
– The parameters to the function can be any string or number. One parameter may also be a variable or record field.
A number of functions may be defined in the future.
• The select() function takes as its arguments:
–
–
–
–
The field to return from the other table
The table to query
The field to query against in the other table
The value to search for in that field.
• The function then returns a list of all of the values of the return field in all the records that matched
the query.
• The select statement will be executed each time the user selects a different Category, and will
update the list of options in the Subcategory field based on the query, which depends on the
Category value.
• The select function was designed to work against many records and grab a scalar value from each
one to make a list. You can also select just one record and use an array from within that record to
make a display list.
• For example, you can select all the login IDs from a department to make a list:
– select("name","operator","department",[$dept])
or select all the approvers for a certain CM group:
– select("approvers","cm3groups","name",[$cm3group])
©2009 Hewlett-Packard Development Company, L..P.
9
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
10
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
11
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
12
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
13
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
14
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
15
HP Service Manager 7.x: Advanced
• Overuse of DVD on forms can result in performance problems
– Using select() or a $ variable that is not on the form requires an interaction with the server. The use of
these types of DVD statements can impact performance.
– Using Focus In/Out or Data Changed Events causes a server interaction. During design, the response
time may seem adequate; however on a network with a half second response, it can be slow.
– Data Policy achieves many of the same results without the complexity and without taxing system
resources. For example, one common use of DVD is to set Visible or Read-only conditions, both of which
can be set using Data Policy. With Data Policy, the conditions are evaluated on the server before the
form is sent, thus avoiding a network interaction.
• Beware of complex DVD queries.
©2009 Hewlett-Packard Development Company, L..P.
16
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
17
HP Service Manager 7.x: Advanced
©2009 Hewlett-Packard Development Company, L..P.
18
© Copyright 2026 Paperzz