Solved

Totaling 3 fields on form.

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now