Lotusscript - Clear all fields content

Hello,

I made a form in Designer.

I added an “erase content” button, so that the user can clear all the fields.

How can I achieve this with lotusscript.

I want a loop that runs over all fields, and set an empty value to it.

Thanks in advance

Greetings

Lainkes

Subject: Well, set the value to “” for every field using Notesuidocument, FieldSetText ?

Subject: Lotusscript - Clear all fields content

That was also my first reaction, but I have more than 100 fields.So I’m looking a way to do this with a loop.

I’m a Delphi programmer, and there it was possible to do that.

Something like this :

For “every field in form” do

field := “”

Greetings

Lainkes

Subject: Designer Help

When you look at the designer help you will find doc.Items…

For example:

Dim doc As NotesDocument

Dim uiDoc as NotesUIDocument

'…set value of doc and uiDoc…

Forall item In doc.Items

Call uiDoc.FieldSetText( item.Name,“” )

End Forall

This could be tricky because the fields should be editable so perhaps better:

Forall item In doc.Items

Call doc.ReplaceItemValue(item.Name,“” )

End Forall

Call uiDoc.Refresh()

This will clear ALL fields!