Fill all empty fields

Does anybody know of a script, which fills all editable empty fields with a predefined value?I’ve got a form which has a large number of fields which have to be filled with numbers. In order to calculate with these, I’d like to add a button, which fills the editable empty fields with 0 as value.

Any help is appreciated

Subject: Fill all empty fields

Hi,

Maybe you can use a different approach giving a default value for every field?

HTH

Daniel

Subject: Fill all empty fields

In your button loop through the NotesDocument.Items property and check if there’s a value:

Forall item In doc.Items

If item.Values(0) = “” then

  Set item = doc.ReplaceItemValue( item.Name, 0 )

End If

End Forall

Subject: Fill all empty fields

Since your requirement is to fill only editable fields, you’ll need to use either front-end LotusScript or Javascript. In LS, you’d keep using uidoc.getnextfield until uidoc.currentfield doesn’t change. In javascript, you can loop through the form’s elements array, skipping elements with a type of button or hidden (or reset or submit…).

Subject: RE: Fill all empty fields

Thanks! works fine.