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     Susannah's cool technique for long SELECT box lists:

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Susannah's cool technique for long SELECT box lists:
 Login/Join
 
<monte2000>
posted
Here's a cool technique for long SELECT box lists:

Group similar items using the OPTGROUP tag, and here's some code to do it.

FILEDEF MYLIST DISK D:\Inetpub\wwwroot\{wherever}\MYLIST.txt
TABLE FILE INPUT
PRINT ITEM_DESCRIP
BY ORDER
BY GROUP
BY GROUPNAME
BY SUBGROUP
BY ITEM_NUMBER
ON TABLE HOLD AS HTEMP FORMAT ALPHA
END
-RUN
-SET &A = ' ';
-SET &B = ' ' ;
-SET &C = ' ' ;
-SET &D = ' ' ;
-SET &E = ' ' ;
-SET &F = ' ' ;
-SET &GROUPHOLD = ' ' ;
-RUN
-REREADSTY1
-READ HTEMP NOCLOSE &A.A2 &B.A1 &C.A34 &D.A2 &E.A8 &F.A20
-IF &IORETURN NE 0 GOTO ENDREAD ;
-IF &B EQ &SEASONHOLD GOTO WRITEIT ;
-SET &OPTLABEL = '<OPTGROUP LABEL = "' | &C || '" >' ;
-* note: closing the OPTGROUP tag is not a requirement. whew.
-WRITE MYLIST &OPTLABEL
-SET &GROUPHOLD = &B ;
-WRITEIT
-SET &OPTION ='<OPTION VALUE = "' | &E | '" >' | &D | ' ' | &F || '</OPTION>';
-WRITE MYLIST &OPTION
-GOTO REREADSTY1 ;
-ENDREAD
-*
and the output file looks like this
<OPTGROUP LABEL = "SPRING 2004" >
<OPTION VALUE = "E03PP604" >DR ALICIA DRESS</OPTION>
<OPTION VALUE = "P0216104" >PS ANASTASIA JACKET</OPTION>
<OPTION VALUE = "P0216114" >PS EFFIE JACKET</OPTION>

and it shows up beautifully in a select box, with the OPTGROUP label in bold and italics, very nicely separating your groups in your select box.
 
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     Susannah's cool technique for long SELECT box lists:

Copyright © 1996-2020 Information Builders