I have been playing around with a spreadsheet sample using our @Midas Formulas. It is fun, although I'm not sure yet how applicable it is to "real" applications. Basically, I am using the following table which was pulled from the Lotus Sales Tools db, and which is probably not even accurate anymore, but will serve for this purpose:
Now, I want to use this as the basis for a spreadsheet, which I have built below:
This latter table will use both the original table and its own values to calculate other values in the table. All of this is a single rich text field, incidentally, with no fields at all. The cells in blue are "editable", in that changes will be reflected elsewhere. The cost per unit and total cost per product columns are all built with computed text. For example, the Cost per unit column of the Messaging Express row has the following formula:
Basically, we look up the tradeup value (either "Y" or "N") from the spreadsheet table and the price from the pricelist table. The tricky little line @If(tradeup = "Y"; 3; 2) determines which column of data the correct price will be. The price is determined to be $96.00. Note that this is just a computed text hotspot in the cell. The Total cost per product for the same row reflects this prices times the count of users, or 155*96.00=14880.00.
So, what happens if we change one of these values. For example, if I change the tradeup flag from N to Y, the prices will change. After I press the Refresh button, which just does a uidoc.save and uidoc.refresh, the result is:
Compare that again with the original table (below so you can see them side by side) and see that the Cost per unit of the Messaging Express row has changed to $48.00 to reflect the tradeup price, the Total cost per product cell has also changed to 155*48.00=7440.00 and the grand total at the bottom has changed to $29896.25 from $37336.25. Voila, a spread sheet in a rich text field.
Hmm, I may also write a sample that uses the Midas Rich Text LSX to build the spreadsheet sample in the first place. That would be a cool use of the two products together.
Copyright © 2004 Genii Software Ltd.