Adding Conditions to a Link Record in HP Service Manager

July 28, 2010

How to add conditions to your link record.

Lets say that you always want to always keep the phone number that is entered by the user for a particular ticket regardless of what is in the contact record.  This may come about if you have a telephone number for a contact that is only applicable to that ticket.  Lets take a look at how to do this.

First we want to save the old values, so in the pre fill expressions we will add:

$save.field=field in $File;

We would repeat this step for all the fields we are going to check if they have changed.

Next we need to add the conditional expressions in the post fill expressions.  Don’t forget to cleanup your variables when you are finished:

if (field in $File ~= $save.field) then (field in $File=$save.field);

cleanup($save.field);

This will leave the fill value in the record unless it is different from the initial value, in which case it will replace the fill value with the saved value from the previous step.

Or you could use this technique to tie a particular type of telephone number to the priority of the ticket.  Lets use the office number for low priority, and the cell for high priority.  First we add variables in place of the “fill to” values (where the field on the form would usually be located) for all the phone numbers we might use.

fill to                 fill from

$work.num               contact.work.phone

$cell.num               contact.cell.phone

Then in the post fill expressions we need to add code to use the correct telephone number based on the value of priority (always cleanup your used variables)

if (priority in $File=”low”) then (contact.phone in $File=$work.num);

if (priority in $File=”high”) then (contact.phone in $File=$cell.num);

cleanup($work.num);cleanup($cell.num);

This same technique could be used in a variety of ways including conditional fill of other fields based on certain fill values or even modifying the values that are being generated by a fill.  Although the code we used is rather simple, it is powerful and indeed a valuable tool in Service Manager.


Comments

Comments are closed.

Contact Us

Laura Walker
Director of Business Development
Office: 701-232-5697 x27
Mobile: 701-306-7774
Email: lwalker@stratacominc.com

Client Testimonial

“As the project progressed through the various phases, StrataCom demonstrated their customer service commitment. A high level of responsiveness both in day-to-day support as well as with the deliverables assigned to them was realized. StrataCom became a true partner with us and the project team genuinely felt that our success was a priority for them. As a partner, StrataCom actively performed knowledge transfer and mentored our technical staff, accelerating our learning curve with the product.” ~Client Project Manager