Focal Point
[SOLVED] How To Recognize The First Occurrence of a Field Value

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/462105045

October 05, 2010, 09:00 AM
ktnj
[SOLVED] How To Recognize The First Occurrence of a Field Value
Hello All,

This there a way in the Define section to recognize the first occurrence of a field value.
For example:
Selectval/A1 = IF FST.ACCOUNT_NUMBER EQ '123' THEN 'Y' ELSE 'N';

Thanks to all,
Ken
Z/OC
FOCUS 7.6.5

This message has been edited. Last edited by: Kerry,
October 05, 2010, 10:38 AM
Wep5622
I think you can do something like this:
DEFINE FILE CAR
    FIRST/A1 = IF ACCOUNT_NUMBER NE LAST ACCOUNT NUMBER THEN 'Y' ELSE 'N';
END


The trick being that LAST refers to the previous row.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
October 05, 2010, 04:37 PM
Waz
If you use Web5622 suggestion, the data must be presorted.

This shouldn't be an issue with an RDBMS, but care must be taken.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

October 06, 2010, 08:17 AM
ktnj
[SOLVED] thanks