Focal Point
Ampersand in string variable

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4211050661

May 01, 2006, 02:32 PM
rc
Ampersand in string variable
All,

Have an ampersand in the string that is passed in.

When I use something like this
HEADING
""
""
"&BR"
""
And the value is in &BR is "Bill & Jake"

I get "Bill" only.
What is the work around for this problem?
Thanks in advance.
May 01, 2006, 03:10 PM
Kamesh
If that value is hardcoded one, then you can make that as Bill & amp Jake.


WFConsultant

WF 8105M on Win7/Tomcat
May 01, 2006, 03:56 PM
reFOCUSing
Here is something else you can try:
-SET &STRING = 'Bill &| Jake';
-TYPE STRING: &STRING


Also if you are getting the string passed from a GUI you could ascii encode the string. We did this and it works great.

Your url should look something like this:
http://servername/ibi_apps/WFServlet?IBIF_ex=report.fex&HEADING=Bill+%26+Jake

This message has been edited. Last edited by: reFOCUSing,
May 01, 2006, 06:58 PM
susannah
I decided to replace all the & in my inbound character strings with + using the CTRAN function.
MYFIELD/A30=CTRAN(MYFIELD,30,38,43,MYFIELD);
ascii for & is 38 and for + is 43
Cheating, i know,
but works for me!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
May 05, 2006, 04:22 PM
rc
Used the recommended suggestion from reFocusing in my VB.net code and it worked like a charm.