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     Filtering characters that WebFocus doesn't like....

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Filtering characters that WebFocus doesn't like....
 Login/Join
 
Gold member
posted
I've got a resource layout app with a textarea control to house fully freeform comments. The client plans in some cases to cut and paste entire emails from outlook, which can include embedded quotes, carriage returns and god knows what other characters that cause the MODIFY commmand to ultimately fail. We have UDB on Unix as the database, with the comment field being varchar.

Can anyone give me guideance on how I can code on the back end, to not disrupt the user on the front end? I'd like to have the ability to save virtually anything that can be keyed or pasted in, and when reporting on it after the save, be able to display exactly what was keyed. I suspect that the CTRAN command maybe has some value (I haven't really used it before), but I'd like to know a solution that covers every bad thing that can come in, not just single quotes or carriage returns. I'm comfortable with using javascript if that is the best approach.
 
Posts: 59 | Location: Minneapolis | Registered: September 01, 2004Report This Post
Expert
posted Hide Post
the way i do it, Inside, is just as you suggest..
CTRAN
i use CTRANs in the master file description of our customer lists . i take out every character i can think of. Other commands are extremely valuable: STRIP and SQUEEZE and TRIM, SUBSTR
One particularly ornery character is the carriage return inside a text memo field,which gets ported to me as a wide character field with these goofy embedded square boxes.
I copied the box character and then placed it inside a BYTVAL command to find out what the value was.
When my users view one of these customer lists, it looks perfect. When they ask for the underlying file... because they think they can clean it better...i give it to them... garbage and all. Big Grin
So my mfd's have 10 lines of fields and 200 lines of defines...fantastic.
...a thought just hit me.. you could use and combo of BYTVAL and HEXBYT to examine every single character in the incoming varchar, and accept it only if it is in a certain range (letters, numbers)...that way you wouldn't be blindsided...hmmm. i may rethink my own app..




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Inside,

If you're happy with JavaScript code in your launch page being called upon submit, then you could use the "replace" function -
    var vTitle = document.title;
    vTitle = vTitle.replace(/ /g,"");
    vTitle = vTitle.replace(/a/g,"");
    vTitle = vTitle.replace(/e/g,"");
    vTitle = vTitle.replace(/i/g,"");
    vTitle = vTitle.replace(/o/g,"");
    vTitle = vTitle.replace(/u/g,"");

I use this to remove spaces and vowels from an HTML pages title.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     Filtering characters that WebFocus doesn't like....

Copyright © 1996-2020 Information Builders