Probably an easy question

Sorry this is too easy for most of you. I’ve been out of Lotus developing for a while and can’t remember simple things like this.I have a form with a row of fields, like FieldA, FieldB, FieldC and FieldTotal.

They’re all numerical. When any field A, B, or C, changes, I’d like the FieldTotal to = the sum of fields A through C. What kind of code do I need for this? I’ve been messing with onChange for a few hours but getting nowhere. Thanks in advance.

Subject: Probably an easy question

Hi there,

Welcome back!

I recommend making your total field computed and putting in an @Sum formula. You need to make the form refresh though as people add values to the other fields so you could put a formula in onclick event which refreshes the document to refresh the total

dim ws as new notesuiworkspace

dim uidoc as notesuidocument

set uidoc = ws.currentdocument

call uidoc.refresh

remember to account for if fields have nothing in them… this would be treated as text so you need to check for this.

Subject: RE: Probably an easy question

Awesome… Thanks. I put the refresh code in the onchange of each field and works perfectly. Thanks!