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     How to remove ALL option when there's only 1 item in dropdown?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to remove ALL option when there's only 1 item in dropdown?
 Login/Join
 
Virtuoso
posted
We have a launch page that contains a dynamic dropdown with options based on who logged in. For some people this dropdown only contains 1 dynamically generated option, but also the static 'ALL' option.

It doesn't make sense to have 'ALL' when you only have 1 choice. Is there some setting somewhere that removes 'ALL' when there are ≤ 1 options available?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Hi WEP,

I've run into this on occasion and am not aware of a switch to toggle it. So, I've had to handle it manually by adding a text value called ALL to the HOLD file and appending the actual values to this HOLD file so that the control drop-down displays the values with ALL appearing at the top. This may or may not work for you probably based on the number of records in the tables used to populate the controls.

This uses the CAR file and has 3 drop-downs for Country, Car, and Model. The report displays these 3 fields plus Bodytype. ALL will only display in the Car/Model controls if there is more than one which is based on the Country and then Car values selected.

I'm only providing the controls and report embedded code because of possible HTML Composer version incompatibility. For testing, you should be able to drop these code examples into your own HTML Composer session, but if you would like the full HTML Composer code which includes the HTML and JavaScript, let me know.

The following embedded code is behind 3 chained controls Country, Car, and Model and then finally the report code.

COUNTRY control
Datatype=DYNAMIC, Embedded
Value=COUNTRY
Display=COUNTRY
All=ON
Cache=ON
TABLE FILE car
SUM FST.CAR.ORIGIN.COUNTRY
 BY CAR.ORIGIN.COUNTRY
-*insert_filters_here
ON TABLE PCHOLD FORMAT XML
END


CAR control
Datatype=DYNAMIC, Embedded
Value=CAR
Display=CAR
All=OFF
Cache=ON
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
SUM CAR NOPRINT 
BY CAR
ON TABLE HOLD
WHERE COUNTRY EQ '&COUNTRY'
END
-RUN
-IF &LINES EQ 1 GOTO SKIPALL;
FILEDEF HOLD DISK HOLD.FTM
-RUN
-WRITE HOLD ALL
FILEDEF HOLD DISK HOLD.FTM (APPEND
TABLE FILE CAR
SUM CAR NOPRINT 
BY CAR
WHERE COUNTRY EQ '&COUNTRY'
ON TABLE HOLD FORMAT ALPHA
END
-SKIPALL
TABLEF FILE HOLD
LIST CAR
-*insert_filters_here
ON TABLE PCHOLD FORMAT XML
END


MODEL control
Datatype=DYNAMIC, Embedded
Value=MODEL
Display=MODEL
All=OFF
Cache=ON
-SET &CAR=IF &CAR EQ 'ALL' THEN 'FOC_NONE' ELSE '&CAR.EVAL'; 
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
SUM MODEL NOPRINT 
BY MODEL
WHERE COUNTRY EQ '&COUNTRY'
WHERE CAR EQ '&CAR'
ON TABLE HOLD
END
-RUN
-IF &LINES LE 1 GOTO SKIPALL;
FILEDEF HOLD DISK HOLD.FTM
-RUN
-WRITE HOLD ALL
FILEDEF HOLD DISK HOLD.FTM (APPEND
TABLE FILE CAR
SUM MODEL NOPRINT 
BY MODEL
WHERE COUNTRY EQ '&COUNTRY'
WHERE CAR EQ '&CAR'
ON TABLE HOLD FORMAT ALPHA
END
-SKIPALL
TABLEF FILE HOLD
LIST MODEL
-*insert_filters_here
ON TABLE PCHOLD FORMAT XML
END


REPORT code
-SET &CAR=IF '&CAR.EVAL' EQ 'ALL' THEN 'FOC_NONE' ELSE '&CAR.EVAL';
-SET &MODEL=IF '&MODEL.EVAL' EQ 'ALL' THEN 'FOC_NONE' ELSE '&MODEL.EVAL';
TABLE FILE CAR
PRINT 
     BODYTYPE
BY COUNTRY
BY CAR
BY MODEL
WHERE COUNTRY EQ '&COUNTRY' 
WHERE CAR EQ '&CAR'
WHERE MODEL EQ '&MODEL'
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=TITLE,
     STYLE=BOLD,
$
ENDSTYLE
END

This message has been edited. Last edited by: DavSmith,



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
 
Posts: 161 | Location: Dallas, TX | Registered: February 20, 2009Report This Post
Guru
posted Hide Post
I'm no Guru, but I had this happen once and I just changed the drop down to multi-select and unchecked the 'ALL' option. That way the user could pick one or two or all or however many selections their little hearts desired.

Smiler


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report 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     How to remove ALL option when there's only 1 item in dropdown?

Copyright © 1996-2020 Information Builders