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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Numbered listing
 Login/Join
 
Platinum Member
posted
Here's my scenario. I would like to do something like a list with groups, except that I don't want the numbers to restart after each group.

So it should look like this:

Group A
1 car
2 truck
3 van
Group B
4 motorcycle
5 moped
6 scooter

Is there a way to do this with LIST, or must I use a DEFINED field for this?

Thanks!
 
Posts: 87 | Registered: August 03, 2006Report This Post
Virtuoso
posted Hide Post
Far as I know list numbers based on a by field. I'd use a compute to get your 'list' as the first field in the list.

compute countlist/i5 = if countlist eq 0 then 1 else countlist + 1; as 'LIST'

Of course many ways to skin a cat. Define won't work unless the file is in the order you want to 'list it'.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Thanks Leah,

It worked the following way (similar to what you mentioned):

TABLE FILE DATA
PRINT
CAR
YEAR
BY CAR
BY YEAR
ON TABLE HOLD AS DATA1
END

DEFINE FILE DATA1
CNTR/I6 = IF CNTR EQ 0 THEN 1 ELSE CNTR+1;
END

TABLE FILE DATA1
PRINT
CNTR
CAR
YEAR
ON TABLE HOLD AS DATA2
END

TABLE FILE DATA2
PRINT
CNTR
CAR
BY CAR
BY YEAR
END


This basically gets the data that I need sorted on the first pass, then adds the counter on the second pass, then displays the counter in the groups I need them in on the last pass.

Thanks a bunch!
 
Posts: 87 | Registered: August 03, 2006Report This Post
Expert
posted Hide Post
You should be able to do it in a single pass - depending upon the number of fields you have in the output and their layout etc.
TABLE FILE GGSALES
SUM COMPUTE LIST/I9 = LAST LIST + 1;
    ST
    DOLLARS
-* This is your group field
BY REGION NOPRINT
-* This is the field that you want ranked within your report
BY ST NOPRINT
ON REGION SUBHEAD
"Region <REGION"
END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
I might stay away from LIST as a fieldname. It was a valid verb in the past and as such would be a reserved word. I don't know if it works now though and I've just shut down my vmware image. I'll test it out tomorrow if I get a chance.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Expert
posted Hide Post
Very true Karen, forgot about that! (early morning etc. Wink) However, it worked on 7.6.2 on Windows this am.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
This could help:
DEFINE FILE CAR
DUM/A1=' ';
END
TABLE FILE CAR
LIST CAR
BY DUM NOPRINT
BY COUNTRY NOPRINT SUBHEAD
"Group: <COUNTRY "
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
This also works.

TABLE FILE CAR
PRINT COMPUTE CNTR/I9=CNTR + 1; AS LIST CAR
BY COUNTRY
END
COUNTRY LIST CAR
------- ---- ---
ENGLAND 1 JAGUAR
2 JENSEN
3 TRIUMPH
FRANCE 4 PEUGEOT
ITALY 5 ALFA ROMEO
6 MASERATI
JAPAN 7 DATSUN
8 TOYOTA
W GERMANY 9 AUDI
10 BMW


FOCUS 7.6 MVS PDF,HTML,EXCEL
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders