Saturday, February 5, 2011

HP SM7 notes

Hello
I’ve worked on HP Service Manager 7 for awhile and since I’m moving to Oracle products, I thought why not post some of my notes. Hope they would be useful to someone.
• To indicate a ticket is active, the “flag” column is set to “TRUE”
• pfduplicate($file0,$file) makes a copy of $file before saving eg contact.name in $file0 ~=contact.name in $file

• $L.file.save is used when there is update to refer to the file b4 updates. e.g. in notification, assignment in $L.file.save ~= assignment in $file.
• If ($L.check=”1″) then $L.schrott=rtecall(“select”, $L.rcselect, $device, $query.device,{asset.tag}) to sort the results by asset.tag.
• If you need a button on a format but not in option menu, then leave the default label field blank and enter the text label only.
• script.execute in fc, file: $file, name: the name of script.
• insert(RC,2,3,4) inserts 4 in position 2 for 3 times.
• rtecall(“isnumeric”,RC,string,”-“) “-“ is the allowed exception.
• currec() : represents the current file handle in queries
• se.call.process in fc: file: $file, name: process name
• apm.start.clock in fc: name: problem, prompt: assignment in $file(watching assignment), query: number in $file.
• post.fc: name: file: $file, name: name of the link, prompt: the target field
• Sorting:
if (filename($L.filed)=”incidents”) then ($L.void=setsort($L.filed, {“open.time”}, 1))
if (filename($L.filed)=”probsummary”) then ($L.void=setsort($L.filed, {“open.time”}, 1))
$L.rc=rtecall(“rgoto”, $L.rc1, $L.filed, 0)
Explanation of setsort() syntax in this example:
====================================
$L.void => dummy variable. Required for syntax.
$L.filed => the file variable in use by the application
{“open.time”,”key2″….} => Array of character fields, specifying the sort fields
Note: The first specified field is the primary sort sequence; the second field is the secondary sort sequence, and so on}
0 => sort order (0=ascending, 1=descending)
• How to set focus to the first record at the top of the QBE list after using setsort()
One issue with setsort() is that the cursor (the focus line of the QBE, marked in blue) might be left on the original first record retrieved, rather than the first record after sorting is done. This means that the list might appear with the cursor anywhere in the top, middle, or bottom of the list and the user must scroll to return to the top of the list. To set the focus to the top line and avoid this problem, include the following expression on the next line of the Initialization Expressions, after the setsort() call:
$L.rc=rtecall(“rgoto”,$L.rc1,$L.filed,0)
This last command works but the result is still not correct. After you resort by doubleclicking the tableheader, the selected row is the bottom row and you have to scroll again.
2-$L.void=rtecall(“sort”,$L.rc, $device, 1, 1)

Part 2 

Part 3

No comments:

Post a Comment