Retrieving values from previous row in view

I’m trying to build, for all practical purposes, a check register and have been puzzling over a problem.

I’m a bit of a noob and am trying to get the value of the “balance” column to become a variable to/from which the next row can than add or subtract its transaction, creating the next incremental balance.

I don’t want to just compute the balance and post it to a field in the document’s form, because entries may be added out of sequence and the view is going to hard sorted by date. So the addition of an entry which took place on a previous date would screw up incremental balances (I think).

While I’m not afraid of Lotus/JavaScript, if it can be done in @Formula, that’s be preferred.

Finally, I imagine that once there’s enough documents in the view, recalculating totals after entering in an entry from an older date will produce a lot of overhead. Is there a good strategy for minimizing this potential overhead?

Thanks in advance,

Sam

Subject: Retrieving values from previous row in view

It can’t be done, at least not in a view in the Notes client. A view entry can only reference the document it represents or a static value. The built-in total feature, which is built AFTER the documents are indexed and modifies only category and total rows, is all that’s avilable to you in a view.

Subject: RE: Retrieving values from previous row in view

Thanks for your response Stan,

I’ve got two possible ideas which may or may not work, or perhaps both work but one is a cleaner solution than the other.

1st, would it make sense to set up an ODBC connection document to MySQL or Cloudscape or something? It seems like the accounting register could be easily done by a relational database, yet I need the info entered in and accessible by Notes. This might make the view only work while I’ve a connection to a Domino server, and I would like very much to have offline capabilities. Moreover, even an embedded database would likely have trouble working on a mobile device which I need to be able to plan for, for future use.

Or…

2nd, use a form and not a view to display the info. I could probably set up a dynamic table with some computed fields in each cell, or finally come to terms with using CSS in the Notes client / Web environs. Either way, the results of the computed fields can be based off of a constantly updating view, and could do the necessary maths, they’d be all be variable, etc. It would certainly be a challenge, but a rewarding one… assuming it works. You all would know better than I obviously. :slight_smile:

I’m more than ready to get my hands dirty on this --eager even, and it’s got to get done SOMEHOW. Moreover, I know Notes can do it (or anything for that matter if you are willing to puzzle it out long enough) I just do not have enough experience with the platform yet to know where one tool or strategy would be more appropriate than another. Nor do I have enough time at my disposal to wander down each possible road at the risk of finding out that it doesn’t work.

Stan, if you or anyone else could weigh in on these ideas, or have any others to offer, I would be most grateful.

Some times an encouraging nudge is all that’s needed.

Anyway, thanks in advance.

Sam

Subject: RE: Retrieving values from previous row in view

You can certainly get the data into another display forum easily enough. Populating a Rich Text field on a form to build a table with an agent would be one way, and if all of the data you are accessing is taken from view columns rather than from the items on the documents, you can get something that builds on demand fairly snappily. All you’d need to do is make sure that your report table is one column wider than the view, then write the cumulative balance to that column as you go. The native NotesRichTextTable stuff should be up to the task – there’s no need to resort to the uncertainties of HTML/CSS rendering in the Notes client across versions.