Service Desk Practitioners Forum
Showing results for 
Search instead for 
Did you mean: 

Apply rule to existing data

Go to solution
Steve Liddle
Super Collector

Apply rule to existing data


I'm using HPSD 4.5 SP17 and am wondering if there is a way to apply a rule to existing data.

In particular, I have created a Service Call database rule that will copy caller to requestor, so that this can be viewed on the Service Today view. This is working fine for new calls. There is a number of older open calls that have a blank requestor field as they were created before the rule was implemented.

I'm wondering if there is a way I can apply my rule to the older open calls so that the caller is copied to the requestor field?

Ruth Porter
Honored Contributor

Re: Apply rule to existing data

Hi Steve,

The technique is to make a copy of your rule and alter the condition to make something else trigger it temporarily (e.g. Source ID being set to *******. Then do an advanced find to find the records you want to apply the rule to and use update all to make the temporary trigger (e.g set Source ID to *******).

Then remove the tempory rule.

Note you may want to do a few at a time to avoid performance issues.

Hope this helps, Ruth
Radovan Skolnik
Honored Contributor

Re: Apply rule to existing data

Ruth is right (as usual ;-). There is one more option: use my UpdateAllEnhanced from here: That would allow you to Update using references to other fields, expressions, etc - the same way as in rules. However I tested the thing on SP18+ so I am not sure it will work on SP17. But you might want to try. That way you do not need the rule at all...
Steve Liddle
Super Collector

Re: Apply rule to existing data

Thanks Ruth. I see what you are saying about triggering a rule by using a special value for a one off update. Very clever :-)
Ryan Jenkins
Regular Collector

Re: Apply rule to existing data

Yet another option is to the the API and create a script to grab the IPerson item from the Caller field and populate the Requestor with this data.
//Add this to "OnDomLoad" event