Is it creating Profile document faster than total by view?

I have the following view:Region

Eastern USD20K 50 Units

 Sale 1              5k , 20 units

 Sale 2            15k , 30 Units

Western USD30K, 18 units

 Sale 1             5k,    3 Units

 Sale 2            10k,   10 units

 Sale 3             15k,   5 Units

The problem is that, I need to compute cost per unit, I was thinking of having a view, and than create a form which will lookup the view, and get the total using @sum. However, when I have 50,000 documents, this view need to be updated. So, is it better, I make the document, whenever saved, will update one profile document. So I just need to retrieve this document, to know the latest total.

Problem is that, I don’t know how to create a profile document. I know there is help, but it will be much easier to understand, if I can get some example on how to create it.

Also, anyone can share with me how to write the formula, can I use @Command, or I need to write LotusScript, anyone got sample of script which I can modify, scenario as below.

I creat a form called balance. Following are the fields

Region: Eastern or WEstern

Current Balance: A

Last Transaction: B

Final Balance: A+B, which give me final balance as at today.

Any help is greatly appreciated.

Subject: Is it creating Profile document faster than total by view?

Will,

Performance will be better, but you will have a less robust system because that profile doc might get updated simultaneously by multiple users. Profile docs aren’t really intended for that. They’re intended for being read simultaneously by multiple users, but not for being updated that way.

regards,

raphael

Subject: RE: Is it creating Profile document faster than total by view?

Any better way that you might suggest? Really appreciates if you can share any other method. Anyway, thanks for sharing, at least I am now better aware of the potential problems.

Subject: RE: Is it creating Profile document faster than total by view?

There’s a third option which is efficient. Add a totals column to the view, and use a NotesViewNavigator to get the totals row.

Subject: RE: Is it creating Profile document faster than total by view?

This is interesting, first time I heard about NotesViewNavigator, is this by lotus script? Can you please guide me on how to get the value?

Eg:

Category:

Eastern USD 20m

 Sale 1      usd 10m

 Sale 2      usd 5m

 Sale 3      usd 5m

So, say that I created a form, TotalField will get value of USD20m, what is the formula for me to write in field TotalField?

Really appreciates your time in helping me out…

Cheerio!

Subject: RE: Is it creating Profile document faster than total by view?

All right. It kind of bugs me when I point someone at something, and they immediately reply “tell me all about it.” That’s what the documentation is for. Please go read the documentation, which I do not have the time to rewrite for you here, and only ask for more help if you get stuck.

If you press F1 from Domino Designer, it will open a help database full of all sorts of goodies, including a description and examples of the use of this class. Notice that the overall total row is the last row in the view, so you could use the GetLast method to obtain its value. There are also category totals, which you can read using GetFirst and GetNextCategory (or GetNextSibling).

There’s also a nice redbook you could refer to: Domino Designer 6 A Developer’s Handbook.

Subject: RE: Is it creating Profile document faster than total by view?

Tq Andre, your tips have helped to be able to focus on the relevant area.