Solved

Totaling 3 fields on form.

Posted on 2002-03-19
4
169 Views
Last Modified: 2013-12-18
I've got 3 numeric/editable fields (Fld1,Fld2,Fld3) on a form, which are totaled into a fourth field (TotFld).
I want to have the total (TotFld) calculated whenever a change is made to any value in fields Fld1, Fld2, or Fld3.  

I'd like to avoid using the 'Form Refresh' property. Possibly performing the calculation in the "Exiting" event of each field???

Can someone provide the Lotuscript and where it needs to be placed to get this to happen.

Thanks,
SAK
0
Comment
Question by:SAK
  • 3
4 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 total points
ID: 6880759
Copy this to all of the "fld#"

Sub Exiting(Source As Field)
     Dim ws As New NotesUIWorkspace
     Dim note As NotesDocument
     Set note = ws.CurrentDocument.Document
     note.Total = note.FLD1(0) + note.FLD2(0) + note.FLD3(0)
End Sub

And Make the total a computed field.

~Hemanth
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6880762
Replace Total with TOTFLD in script so suit your form.
0
 
LVL 1

Author Comment

by:SAK
ID: 6880845
That's exactly what I was looking for.
THanks!
SAK
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6880849
Anytime.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question