Clearing out of "Null" a subform

woodalls6150930

04-05-2017

How do I null an entire subform when that subform is selected from a drop down list.  Currently once information is entered and you click away and go back to the original subform, the information from the previous entry is on the form. Thank you in advance for your response.

Accepted Solutions (0)

Answers (2)

Answers (2)

Magus069

MVP

04-05-2017

Hi there,

Just for specifications, to reset data of a subform, you need to specify its full reference_syntax.

You can access the reference_syntax easily by using the property 'somExpression'

E.g.:

Hope this help!

lateniteNC

04-05-2017

Depending on the complexity of your form, different approaches may be needed, but the simple way to clear a form is to use the reset statement.

In JavaScript, use:

xfa.host.resetData("object name");

will clear any data in that object. The object can be an entire form, page, or individual object on the form.

You can use that a button (click event) or on other events, depending on what you want to do with your form.