(Ignore the dashes, the spaces where getting deleted so I needed to put something there to keep everything spaced correctly)
I only have access to InfoAssist no code, so it must be done entirely in InfoAssist, Any Ideas? Thanks.This message has been edited. Last edited by: Cimmerian,
WebFocus 8.2, IA+, Windows 10, HTML
May 04, 2016, 07:42 AM
Dave
You have to make your own counter...
...or just put everything in a hold and then use a new table with RECORDLIMIT EQ 100
Good luck, dave
_____________________ WF: 8.0.0.9 > going 8.2.0.5
May 04, 2016, 03:48 PM
Cimmerian
Thank you for the reply! Could you elaborate on how to make a counter field, I see it in other places in the forum but it uses the word WITH in the define and InfoAssist is not having that.
WebFocus 8.2, IA+, Windows 10, HTML
May 05, 2016, 09:10 AM
Tom Flynn
Cimmerian, A simplistic way is to use the LIST verb, here is an example(notice the 2nd SORT):
TABLE FILE GGSALES LIST DOLLARS BUDUNITS BUDDOLLARS BY CATEGORY BY HIGHEST DOLLARS NOPRINT ON TABLE HOLD END -RUN ?FF HOLD -RUN TABLE FILE HOLD PRINT * BY CATEGORY NOPRINT BY HIGHEST DOLLARS NOPRINT WHERE LIST LE 100; END -EXIT
The other way is to set a counter and reset on the SORT column:
TABLE FILE GGSALES PRINT DOLLARS BUDUNITS BUDDOLLARS COMPUTE CNTR/I4 = IF CATEGORY EQ LAST CATEGORY THEN CNTR + 1 ELSE 1; BY CATEGORY BY HIGHEST DOLLARS NOPRINT ON TABLE HOLD END -RUN ?FF HOLD -RUN TABLE FILE HOLD PRINT * BY CATEGORY NOPRINT BY HIGHEST DOLLARS NOPRINT WHERE CNTR LE 100; END -EXIT
Thank you for all the replies! I appreciate all the help, I found George Patton's solution to be the most simple (I was overthinking this) and worked like a charm! Thanks again everybody, I will mark this as solved