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     [SOLVED] Dynamic Columns from ListBox or Double List Box

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Dynamic Columns from ListBox or Double List Box
 Login/Join
 
Member
posted
Hi,
I am working on a requirement to give user the ability to dynamically select columns from a listbox or doublelist box.
I populated the column names in the list box from a dynamic parameter.

In the report, i want to user a variable to
SUM &COL_NAMES
BY &COL_NAMES

I can do this for a Single Select List box but not MultiSelect.

Using DoubleList box, I only get the first filed in the list.

How do I make it work?

Thanks!

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.08
Windows, All Outputs
 
Posts: 7 | Registered: September 17, 2014Report This Post
Expert
posted Hide Post
Stick this at the very top of the report to see what actually gets passed from the parameter screen. This should give you a clue as to what's happening.

-? &
-EXIT


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Remove at least the -EXIT before continuing to debug the report.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Hi ccer,

-DEFAULT &P1='';
-SET &FIELDS_LENGTH = &P1.LENGTH;
-SET &FIELDS1 = STRREP (&FIELDS_LENGTH, &P1, 6, ''' OR ''', 2, ' @', &FIELDS_LENGTH, 'A&FIELDS_LENGTH.EVAL');
-SET &FIELDS2 = STRIP(&FIELDS_LENGTH, &FIELDS1, '@', 'A&FIELDS_LENGTH.EVAL');
-SET &FIELDS3 = STRIP(&FIELDS_LENGTH, &FIELDS2, '''', 'A&FIELDS_LENGTH.EVAL');

TABLE FILE CAR
PRINT &FIELDS3.EVAL
ON TABLE HOLD AS TEST
END
-RUN
-* To have dynamic alias names for the fields
TABLE FILE SYSCOLUM
PRINT NAME
WHERE TBNAME EQ 'TEST'
ON TABLE SAVE
END

-SET &howmany = &LINES;
TABLE FILE CAR
PRINT
-REPEAT :LP &howmany TIMES
-READ SAVE NOCLOSE &A.20
-TYPE &A
-SET &FIELDS4=DECODE &A('COUNTRY' 'COUNTRY AS ''The Country''' 'CAR' 'CAR AS ''The Car''' 'MODEL' 'MODEL AS ''The Model''');
&FIELDS4.EVAL
-:LP
END   


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Gold member
posted Hide Post
Hi

If you open a case for this issue and ask for Barry, I will help you with the issue.

If you only get one value passed to the procedure then in the procedure you are using you have something like:

WHERE COUNTRY EQ &COUNTRY

When the AutoPrompt facility parses that it sees it as a simple select and will set the parameter in the HTML Composer to a static value and only pass on variable. A listbox can be set to multiple in the properties of the control but a Double List Box does not have a Multiple property so at the top of the procedure you will have to use a multi-or in a "-Prompt". The following are examples of what to enter at the top of the procedure:


-PROMPT amp_parameterName.(OR(,,)).Please select detail
field(s).

Or

-PROMPT &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN car)).COUNTRY.


I would be more than happy to assist you.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report This Post
Member
posted Hide Post
I resolved this issue using TextBox and Rifaz's method where I replaces 'OR' with 'BY'.

Thanks!


WebFOCUS 8.08
Windows, All Outputs
 
Posts: 7 | Registered: September 17, 2014Report 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     [SOLVED] Dynamic Columns from ListBox or Double List Box

Copyright © 1996-2020 Information Builders