Service Desk Practitioners Forum
cancel

Client (SP16) freezes when execute update data action("substitute for" function)

Highlighted
Vladimir_82
New Member.

Client (SP16) freezes when execute update data action("substitute for" function)

I need to replace some characters in text field (service call):
1. '"' to '\"'
2. '%line.separator%' to '/n'
This is function outline for one of my UI rule: '(SUBSTITUTE FOR [Description (filtered)] String " With \")'
SD Client stuck when I try to execute rule with this "substitute for" function.
But if I try to replase some character to another one with the same length rule executing fine!
Any ideas?
2 REPLIES
George M. Meneg
Acclaimed Contributor.

Re: Client (SP16) freezes when execute update data action("substitute for" function)

Hello Vladimir,

The problem lies when you try to replace '"' to '\"'. Client faces endless loop.

Let's say we have the string.
<>
1234567890123456790123
(the ruller is for displaying the position of the character)

The rule fires. On the position 15 service desk finds " and replaces it with \". Now you have the string and the cursor has moved to the next character which is also ".
<>
1234567890123456790123
That is the loop and it can never end thus client appears to be hung.

You have to modify your rule.
menes fhtagn
George M. Meneg
Acclaimed Contributor.

Re: Client (SP16) freezes when execute update data action("substitute for" function)

Hi again,

I just have a flash and here is a suggestion for modification of your rule.

Do two passes on the field!!

First substitute " with ANY other character that there is not a chance to be appeared on the description (for our example &). Then make a second pass and replace & with \" and will be ok. The only problem is that if the description is about 80 characters and you have many " inside the description will be truncated since description fits 80 characters.
menes fhtagn