Solved

Totaling 3 fields on form.

Posted on 2002-03-19
4
170 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mobile Iron iphone stop receiving new mails 6 1,381
Lotus notes send email with attachments 8 170
Add a cc field to email code 3 117
Bulk lotus notes account creation 3 89
For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

820 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