Re: Power Objects: How can I get the default column value = previous row/column value?
Date: 1996/02/27
Message-ID: <mikek-2702960936040001_at_franklin-tty10.jvnc.net>#1/1
In article <31309042.7D65_at_violet.berkeley.edu>, Hagen Finley <hagen_at_violet.berkeley.edu> wrote:
> I am developing a small application in which it would be handy
> for the value of a column to repeat the value of the same column in the
> row immeadiately preceeding it. Sequencing doen't allow a zero
> incrementation, so that doesn't seem to be the answer. I would imagine
> there is some way to indicate the value of the current row and subtract
> one from that value - but I am hoping someone on the list has a simple
> solution. Thanks!
I guess you will have to use recordsets to do this. You can probably do it in the insertrow() method of the repeater (I assume you're talking about a repeater here) or the postinsert() method of the column object itself. Here's a guess at the former. I have not tested this. It might need to be in postinsert(). You might also look into saving the value in a user defined variable somewhere and grabbing it during insertrow. Let me know if this helps or not.
repeater.insertrow(rownum)
inherited.insertrow ( rownum )
r = self.getrecordset
IF rownum > 1 THEN
r.setcurrow ( rownum - 1 )
theval = r.getcolval ( "colname" )
r.setcurrow ( rownum )
r.setcolval ( "colname", theval )
END IF
Michael Kranzdorf mikek_at_krt.com Kranzco Realty Trust http://www.krt.com 610.941.9292Received on Tue Feb 27 1996 - 00:00:00 CET