Micro Focus QTP (UFT) Forums
Change value to "CAC \(E\) WorkFlow" from "CAC (E) WorkFlow" - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Change value to "CAC \(E\) WorkFlow" from "CAC (E) WorkFlow" (/Thread-Change-value-to-CAC-E-WorkFlow-from-CAC-E-WorkFlow)



Change value to "CAC \(E\) WorkFlow" from "CAC (E) WorkFlow" - Jyobtech - 06-06-2013

Hi Experts,
Can you any one please help me to get the value "CAC \(E\) WorkFlow
" from the value "CAC (E) WorkFlow".
how to write pogram to append "\" for the value "CAC (E) WorkFlow"

Out put value should be"CAC \(E\) WorkFlow"


RE: Change value to "CAC \(E\) WorkFlow" from "CAC (E) WorkFlow" - supputuri - 06-06-2013

Hi Jyo,

use the simple method Replace, below is the snippet.

Code:
strReplaceOpenParnth = Replace("CAC (E) WorKFlow","(","\(")
strUpdatedString = Replace(strReplaceOpenParnth,")","\)")
msgbox strUpdatedString

Let me know if you need any further help.


RE: Change value to "CAC \(E\) WorkFlow" from "CAC (E) WorkFlow" - basanth27 - 06-07-2013

Wouldnt this be a optimized approach? Smile

Code:
oModStrVal = Replace(Replace("CAC (E) WorKFlow","(","\("),")","\)")
msgbox oModStrVal