Service Desk Practitioners Forum
cancel

How to search in 2 fields&update multiple service calls (OVSD 4.5 SP20)

SOLVED
Go to solution
Highlighted
Gints Bika1
Trusted Contributor.

How to search in 2 fields&update multiple service calls (OVSD 4.5 SP20)

Hello,

Using search, did not find any direct solutions. Sorry if I missed something and for a long posting, but it seemed to me that solutions to these problems could be useful for others.

Problem 1: there are 2 Person fields in Service call: Caller and Affected. How to search in both fields, e.g. select * from sc where Caller="Person1" OR Affected="Person1"?

One solution is to create a custom field CallerplusAff and fill with a string "PERSON1SEARCHCODE"+"PERSON2SEARCHCODE" where Person1 is Caller and Person2 is Affected. Then call sd_dataform with parameter CallerplusAff[Contains][Caller;Searchcode].

My question 1: Is this the best solution or there is something better?

Problem2: how to fill the field CallerplusAff in less then >10 hours?

Solution1: update database directly - something like update sc set CallerPlusAff=Persons1.Searchcode+Persons2.Searchcode.

My question 2: Direct insertion was not recommended, direct update too?

Solution2: update service calls using web-api, e.g. sc.setCallerplusAff(sc.getCaller().getSearchcode()+sc.Affected().getSearchcode()); sc.save();

My question 3: Is there a possibility to somehow improve performance something like saving multiple service calls at a time or caching or whatever?

Solution3: [export data in XML, manipulate XML, import] OR [export to Access, manipulate, export XML, import].

My question 4: Is solution2 the best or solution Nr. 1, Nr. 3 are better or there is something even better, say, Solution4?

Thanks in advance.
3 REPLIES
Ruth Porter
Acclaimed Contributor.

Re: How to search in 2 fields&update multiple service calls (OVSD 4.5 SP20)

Hi there,

For the search, can you not use the complex filter on the Advanced tab introduced in SP19?

Could you please explain your other
question(s) because I do not understand what you are trying to do.

Regards, Ruth
http://www.teamultra.net
Gints Bika1
Trusted Contributor.

Re: How to search in 2 fields&update multiple service calls (OVSD 4.5 SP20)

> For the search, can you not use the
> complex filter on the Advanced tab
> introduced in SP19?

If I understand it correctly, the Advanced tab is for "Advanced Find". I tried to use Overview Action "Service calls for this caller", see attachment. Criteria can be entered in "Link condition" where all criteria are "ANDed" (criterium1 AND criterium2 instead of criterium1 OR criterium2). I can't search in 2 fields this way.

> Could you please explain your other
> question(s) because I do not understand
> what you are trying to do.

I have a custom text field CustomerPlusAffected, 2 Person fields Caller and Affected.
I take Caller's Search code, concatenate it with Affected's Search code and assign the string to CustomerPlusAffected.

Then I can display a list of service calls where a person is either Caller or Affected (all SCalls whose CustomerPlusAffected contains person's Search code).
Rytis Damalakas
Super Contributor.
Solution

Re: How to search in 2 fields&update multiple service calls (OVSD 4.5 SP20)

Hi,
Its easy to solve problem2 - make custom field "trigger" and create db rule:
when sc is created or modified and trigger is(*) anything (rule is evaluated when trigger value is changed) set CallerPlusAff=Caller.Searchcode+ Affected.Searchcode

After that just use "update all" and update trigger to any value - CallerPlusAff will be recalculated for all sc

Rytis