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 firstname.lastname@example.org for further assistance. Reference the community FAQ to learn more about the community.
I want to be able to give my users the option to select their sort columns at runtime. I want to have a dropdown list with two options(Region and Country). If the user selects Region the report should sort by Region and then by Country. If she selects Country then the sort should be by Country then by Region.
I've looked at other posts on this forum using the search phrase "dynamic column sorting" but everything I found was about sorting the same column from lowest to highest and vice/versa using a hyperlink.
Can anyone help with this?This message has been edited. Last edited by: Michael Watts,
You can achieve this using dialog manager commands. Below example shows sorting BY COUNTY and BY CAR based on user selection.
TABLE FILE CAR
-IF &USER_SELECTION EQ 'COUNTRY' THEN GOTO L_SRT_CNTY ELSE GOTO L_SRT_CAR;
You can also use this way to avoid the DM command in the TABLE FILE ... END part:
-* EITHER WAY USING IF OR DECODE WORKS, DECODE TAKES LESS CODE
-*-SET &BY1 = IF &USER_SELECTION EQ 'COUNTRY' THEN 'COUNTRY' ELSE IF &USER_SELECTION EQ 'CAR' THEN 'CAR' ELSE 'MODEL';
-*-SET &BY2 = IF &USER_SELECTION EQ 'COUNTRY' THEN 'CAR' ELSE IF &USER_SELECTION EQ 'CAR' THEN 'COUNTRY' ELSE BODYTYPE';
-SET &BY1 = DECODE &USER_SELECTION ('COUNTRY' 'COUNTRY' 'CAR' 'CAR' ELSE 'MODEL');
-SET &BY2 = DECODE &USER_SELECTION ('COUNTRY' 'CAR' 'CAR' 'COUNTRY' ELSE 'BODYTYPE');
TABLE FILE CAR
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
My example is close to Martin's example. Mine assumes you have an HTML page which contains your selection dropdown box. The value selected from the drop down will be passed into your fex as an &VAR. In my example I'm setting '&SORT' since I don't have an HTML page in my example:
-SET &SORT = 'CAR';
-SET &SORT2 = IF &SORT EQ 'COUNTRY' THEN 'CAR' ELSE 'COUNTRY';
TABLE FILE CAR
WF 7.7.05 HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files HTML, Excel, PDF