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     Retaining Checkbox Selecitons [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Retaining Checkbox Selecitons [SOLVED]
 Login/Join
 
Guru
posted
In the fex below, does anyone have any ideas how to maintain the checkbox selections even after the user selects on a column to resort (selecting on the column causes a self drill which means the report is run again which is why I lose the selections)

-* File SelfDrillDown.fex
-SET &ECHO=ON;

-DEFAULTS &SORTORD='FIRST';
-* Previous sort column:
-DEFAULTS &PREVSRT='FIRST';
-* The SORTCOL column is used for sorting:
-DEFAULTS &SORTCOL='COUNTRY';
-* Set up the sort order appropriately:
-SET &SORTORD= IF &PREVSRT NE &SORTCOL THEN 'LOWEST' ELSE
- IF &SORTORD EQ 'LOWEST' THEN 'HIGHEST' ELSE 'LOWEST';
-*

DEFINE FILE CAR
COUNTER/D5 WITH CAR = COUNTER + 1 ;
INFLD/A255='
 <INPUT name=WHICH_CAR value=' | CAR | 'TYPE=CHECKBOX ID=car_checkbox1_' | EDIT(COUNTER) | '>  
';
END

TABLE FILE CAR
PRINT
INFLD AS ''
CAR
COUNTRY
BY &SORTORD TOTAL &SORTCOL NOPRINT
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND' OR 'FRANCE'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
COLOR='BLACK',
STYLE=NORMAL,

$

TYPE=TITLE, COLUMN=P2, FOCEXEC=test ( \
PREVSRT='&SORTCOL' \
SORTCOL='CAR' \
SORTORD='&SORTORD' \
), $


TYPE=TITLE, COLUMN=P3, FOCEXEC=test ( \
PREVSRT='&SORTCOL' \
SORTCOL='COUNTRY' \
SORTORD='&SORTORD' \
), $


TYPE=TITLE, STYLE=-UNDERLINE,$
ENDSTYLE
END

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


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Virtuoso
posted Hide Post
You need to have the report ("test.fex") pass the selected values (to itself) in its drilldowns. The problem is, the number of values selected is variable, and the set of parameters it initially receives varies accordingly, so what do you pass and how do you avoid referencing non-existent parameter variables?

You could set an arbitrary limit, say n selections, provide -DEFAULT for each of the n+2 variables that might be received, and pass them all in the drilldown.

Alternatively, combine the received list of selections into a single variable (say &CAR_LIST) using some safe delimiter character, pass that one parameter in the drilldown, and reconstitute the original set of selection parameter variables (when applicable) at the top of the fex, utilizing GETTOK().

Another alternative is to use a dialog manager loop to generate the portion of the drilldown code that lists the parameter names and values. (If you have multiple drilldowns, make sure your loop labels are distinct.)

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
As it stands, your fex does not pass the selected WHICH_CAR values. That's because the FOCEXEC= type of drilldown creates a URL containing all the parameters specified in the stylesheet, so the WHICH_CAR selections can never make it aboard.

Use JAVASCRIPT= for the drilldown, imbed the report (containing the INPUT controls) within the scope of a FORM, and supply a JS function to submit the form.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
On closer reading ... I think I misread your intent. You want this report fex to grow into a launch page to another report (the real purpose of the check-boxes), but also to allow the user to resort this report on a user-selected column, proserving the checked/unchecked state of the boxes.

You don't need to go back to the datasource (and re-execute the fex) for that; there are javascript 'tablesort' functions available that do just that: sort the TD rows of a TABLE on one of the columns when the column header (TH) text is clicked, and reverse the sort if the same title is clicked again.

See for example, sorttable: Make all your tables sortable


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Thanks this looks neat but since I am not generating the table, how will I set the class?


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Virtuoso
posted Hide Post
In javascript, on load.

Or customize sorttable.js to operate on the first TABLE, regardless of class attribute.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report 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     Retaining Checkbox Selecitons [SOLVED]

Copyright © 1996-2020 Information Builders