Reset all fields on a form

5 pts.
Tags:
Domino Designer
Lotus Domino
LotusScript
I have a form in which upon completion, I need all fields to reset. The data from those fields is being transferred to another field. I need some help with either formula language or lotusScript to do this. The only way I know to do it would be to set all the fields to spaces individually, and there are a lot of fields. Is there a way to reset all fields to the default, or set all fields to spaces at once? Any ideas would be great!
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Pretty simple actually. In LotusScript, it would look something like this:

Forall item in doc.Items
‘ do not reset newly set field
If (item.Name <> “field name”) then
call doc.ReplaceItemValue(item.Name, “”)
End If
End Forall

Of course, you need to setup your session and document context. If you’re doing it on the web, the code needs to be in a WebQuerySave agent since it’s LotusScript.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: