Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Searching for a string havaing an ampersand

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Searching for a string havaing an ampersand
 Login/Join
 
<Kalyan>
posted
Hi,
I have a report which would allow the user to search for names. I am not able to use any search strings having "&" character in it.
eg:if I search for johnson & johnson the procedure assumes that there is a variable &johnson.... Is there any way in which I can use any escape character to handle this? I tried using \ as an escape char and also single quotes but it did not work. Could any one share with me the trick to do this?????
 
Report This Post
Platinum Member
posted Hide Post
If there is a space after the &er it should not be treated as a special character.e.g.
WHERE STORE EQ 'A & P' ;

If there is no space after, then the escape character before a quoted value is needed. e.g.

WHERE STORE EQ 'A \"P" ' ;

When the string is picked up on a form, the & is just another character. e.g.
WHERE STORE EQ '&MYSTORE' ;
and the value supplied for MYSTORE is A & P .
 
Posts: 226 | Registered: June 08, 2003Report This Post
Platinum Member
posted Hide Post
sorry the escape example is..
WHERE STORE EQ 'A \"&"P '
 
Posts: 226 | Registered: June 08, 2003Report This Post
Expert
posted Hide Post
IF CUST_NAME CONTAINS 'JOHNSON &| JOHNSON'
works like a charm.
The pipe character | is the escape character for the &
(we're in win2k, ie, and webfocus 525)
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Kalyan>
posted
That's great!!! Both the suggestions work ..
Thanks a lot.
 
Report This Post
<susanswanger>
posted
I'm having the same problem but my drop down list of selections for &MyStore is being pulled from a list of stores in the Database so how do I replace A&P with A|&P when passing it in? A & P (with the space before the & )does not work it gave me the same error. I don't want to change the name to A and P. Can any one help?
 
Report This Post
<Kalyan>
posted
I guess you are trying to pass the value A&B through a URL.. if that is the case even if you add a pipe symbol before ampersand FOCUS will assume &B as a separate amper variable.

I had a similar problem but I solved it by sending the ascii equivalent of & in the URL. The ascii equivalent is %26

eg: http://yourwebfocusserver?IBIAPP_app=yourfexdirectory&I...=yourfex¶m=A%26B

Hope this helps.

Kalyan.
 
Report This Post
<susanswanger>
posted
Well thanks but I have no idea how to do that. I'm new to Webfocus and I'm using the Resource Layout Painter to create the HTML. Frankly I find plain old ASP with an ODBC connection much easier and much more forgiving.
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Searching for a string havaing an ampersand

Copyright © 1996-2020 Information Builders