Reset data in subform(s) when drop-down changes | Community
Skip to main content
June 11, 2024
Solved

Reset data in subform(s) when drop-down changes

  • June 11, 2024
  • 1 reply
  • 552 views

Hello,

I have searched the already answered questions and have not seen one that would help me.  If this has already been answered, please direct me to the correct post.

Short form:  How can I make a drop-down choice reset an entire subform if it is changed.

Long form:

My form has a basic first two pages, followed by a department-dependent (via drop-down) set of subforms, with their own sub-sub-sub forms, dependent on check boxes.

I want to make it so if the department choice on the drop-down changes, it will reset all of the fields within the department-dependent subform.  Even though the fields will not be visible anymore once the selection is changed, they want the changes to be reset.

I am mostly familiar with using the action builder, and doing basic formulas using FormCalc, so, please be explicit with any answers that involve scripting.

Thank you for your time,

Nichole Wilhelm

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Vijay_Katoch

Write the below script to reset the subform data.

 

xfa.host.resetData("somExpression of your subform will come here");

 

eg.:  xfa.host.resetData("xfa.form.form1.testVk");

 

testVk is my subform name here and form1 is my page name

1 reply

Vijay_Katoch
Community Advisor
Vijay_KatochCommunity AdvisorAccepted solution
Community Advisor
June 13, 2024

Write the below script to reset the subform data.

 

xfa.host.resetData("somExpression of your subform will come here");

 

eg.:  xfa.host.resetData("xfa.form.form1.testVk");

 

testVk is my subform name here and form1 is my page name