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     [CASE-CLOSED]Capture multiple entries separated by semi colon from text or multi box

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE-CLOSED]Capture multiple entries separated by semi colon from text or multi box
 Login/Join
 
Silver Member
posted
Hello, I have searched for different solutions on this forum but I have not been able to find exactly an exact solution. If you know of a thread with a solution, please let me know.

A user will input a series of part # into a html form in a text area or multi box.
The delimiter would be a semi colon or line break.
For example:
Part1; Part2; Part3;

Submit

After user clicks on submit button, a fex report will display Part1 Part2 Part3

I am assuming a javascript is needed to work along with fex with GETTOK function for semi colon.

*** Edit *** I'm not able to get into the last update to add the code tags, but I'm leaving the topic up since there's some good information here. Cheers! Kathryn Henning

This message has been edited. Last edited by: paulux99,
 
Posts: 36 | Registered: October 01, 2003Report This Post
Silver Member
posted Hide Post
You don't HAVE to do this with Javascript
When you pass it, it will land as a parameter.

You can perform string functions on the parameter to remove the semicolons and replace them with other strings or characters.

-DEFAULTH &PARTS = 'Part1; Part2; Part3;';
-SET &Q='''';
-SET &PARTFILTER=STRIP(&PARTS.LENGTH, &PARTS.QUOTEDSTRING,';',A&PARTS.LENGTH);
-SET &PARTFILTER=TRUNCATE(&PARTFILTER);
-SET &NEWLEN=((&PARTS.LENGTH-&PARTFILTER.LENGTH-1)*5) + &PARTFILTER.LENGTH;
-SET &REPLACEMENTSTRING=&Q | ' OR ' | &Q;
-SET &PARTFILTER=STRREP(&PARTFILTER.LENGTH,&PARTFILTER.QUOTEDSTRING,1,' ',6,&REPLACEMENTSTRING.QUOTEDSTRING,&NEWLEN.EVAL,A&NEWLEN.EVAL);

TABLE FILE MYDATASOURCE
PRINT PARTNO
DESCRIPTION
WHERE PARTNO EQ '&PARTFILTER.EVAL';
END


WF: WebFocus 7.7.03
Data: Oracle, MSSQL, DB2
OS: Windows
Output: HTML/AHTML,PDF,EXL2K FORMULA, COMT
 
Posts: 43 | Registered: November 21, 2011Report This Post
Silver Member
posted Hide Post
Nd,
thanks for the suggestion.

Actually It might be better if user can copy and paste a single column of data (from excel) into the text area directly:
Part1
Part2
Part3
Part4

so I replace the delimiter semi colon to CR
However I still need an extra blank space after part1 part2 etc..

The only issue I am having is that I have to add an extra space after part1 part2 etc..
I would like the code updated so I can just load part1 part2 without extra space at the end.

Can you tell me where I need to update my code so it works without adding extra space? I have tried different ways and I have not been able to make it work.
This is my code now that is using carriage return instead of semi colon.

-SET &Q='''';

-*-SET &PARTFILTER=STRIP(&PN.LENGTH, &PN.QUOTEDSTRING,';',A&PN.LENGTH);

-SET &PARTFILTER=STRIP(&PN.LENGTH, &PN.QUOTEDSTRING,'CR',A&PN.LENGTH);
-SET &PARTFILTER=TRUNCATE(&PARTFILTER);

-SET &NEWLEN=((&PN.LENGTH-&PARTFILTER.LENGTH-1)*5) + &PARTFILTER.LENGTH;

-SET &REPLACEMENTSTRING= &Q | ' OR ' | &Q ;


-SET &BEFPARTFILTER=STRREP(&PARTFILTER.LENGTH,&PARTFILTER.QUOTEDSTRING,1,'LF',6,'
',&NEWLEN.EVAL,A&NEWLEN.EVAL);

-TYPE &BEFPARTFILTER

-SET &PARTFILTER1=STRREP(&PARTFILTER.LENGTH,&BEFPARTFILTER.QUOTEDSTRING,1,' ',6,&REPLACEMENTSTRING.QUOTEDSTRING,&NEWLEN.EVAL,A&NEWLEN.EVAL);

-TYPE &PARTFILTER1

This message has been edited. Last edited by: paulux99,
 
Posts: 36 | Registered: October 01, 2003Report This Post
Guru
posted Hide Post
You actually don't need any of this if you use a text area on an HTML Composer page. We take each line as a separate value for a multiselect parameter. So since you state line break may be the delimiter, this should provide everything you need.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Master
posted Hide Post
Thanks David,

I found this recently.
Until now we used either IN (&PARAM) or replaced all ',' with 'OR'.
Which can get messy when they're alphanumerics.

Together with the &PARAM_TEXT option, it's complete.

But this only works with a text-area not with regular text-box.
That's why it took us so long to find out. Since technically a text-box and a text-area ( in HTML ) don't differ that much, I figured ( my bad ) the functionality in WF wouldn't differ either.

Brings me to a question... Why no support for "multiple" for a text-box? ( , or ; seperated ).


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Silver Member
posted Hide Post
David or Dave, thanks for replies.
I have been unable to add a text area using HTML composer, somehow the components area is grayed out.
For time being, I have opened a case with IBI.

My coding below is not working to pull a single column data in text area.
Maybe you can tell me what updates are needed so it can work.


HTML PAGE->
form ACTION="/ibi_apps/WFServlet" METHOD="get">NAME="IBIF_ex" VALUE="multipart" TYPE="hidden">
Close  |  Quick Quote