The problem is here:
>>>event.getDataObject().getDataField("dataAndStockPrices_Date").getValu
e()<<<

The CSpDataField object, when asked for getValue(), will give you the
last value it stored with no relation whatsoever to event.getRowIndex() 

Why don't you use the same mechanism >>
event.getDataObject().getValue(0,0) << or the 
>> getLastResults - getResultTable << route to get myValue?


Aby

-----Original Message-----
From: Rimma [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 05, 1999 1:17 PM
To: [EMAIL PROTECTED]
Subject: [ND] Get the first row from a data object...



Hello,
what is easy way to get the first row from a data object?  I have a data
object that 
contains a list of dates in ascending order.  So every day I'm adding a
new date to that 
DO and, on my page, I need to get that date (which is the first one in
the list).  
Here's the code that I'm using now, but it doesn't work:

if (event.getRowIndex() == 0) {
                 CSpValue myValue =
event.getDataObject().getDataField("dataAndStockPrices_Date").getValue()
;                       CSpHtml.write("Date - " +
event.getDataObject().getValue(0,0).stringValue());
        CSpider.putUserSessionObject("sesDate", (CSpValue) myValue);
        load ("pgSearchResult");
        }
        return (PROCEED);

Thanks,
Rimma
________________________________________________________________________
_

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to:
http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to