reset just the current table instance | Community
Skip to main content
Level 5
Nov 25, 2022 11:05 AM UTC
Solved

reset just the current table instance

Good day,

I asked a question years ago about resetting just the current table instance and I received a reply from Radzar which worked.  Now, it's not working and I can't seem to understand why.  Below was the correct answer to my question.  I recently created another form and used the exact same script, now when I click the button it first clears the information in the first (2) rows of my table.  When I click it again, it clears the information in the other rows.  Any help is appreciated.

 

form1.howobtainedsubform.cardssubform.CARDS.Table1.Row11.adddeletesubform.erase::click - (JavaScript, client)
if (xfa.host.messageBox("Are you sure you want to erase all entries?", "Reset the form", 2,2) === 4){
xfa.host.messageBox("All entries have been removed");
xfa.host.resetData(CARDS.resolveNode("Table1[" + this.parent.parent.parent.index + "]").somExpression);
}
else {
xfa.host.messageBox("No entries have been removed");
}

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Vijay_Katoch
Vijay_KatochAccepted solution
New Participant
Nov 27, 2022 3:36 PM UTC

Yes, SOM expression could be the issue. If you can share the form I can check. 
thanks

10 replies

Vijay_Katoch
Vijay_KatochAccepted solution
New Participant
Nov 27, 2022 3:36 PM UTC

Yes, SOM expression could be the issue. If you can share the form I can check. 
thanks

Translate
Level 5
Nov 28, 2022 10:50 AM UTC

Sorry, I hit the "correct reply" by mistake.  attached is the link.

https://drive.google.com/file/d/1CbYkFhA2bgIxFEwzvtzmV36UbB7tFoi7/view?usp=sharing

Translate
Vijay_Katoch
New Participant
Nov 30, 2022 1:07 PM UTC

Give access on Google drive to email id vkatoch07@gmail.com

Translate
Mayank_Gandhi
Employee
Nov 25, 2022 6:01 PM UTC

@islandgirl23 quick check: it goes in if block? If yes evaluate "CARDS.resolveNode("Table1[" + this.parent.parent.parent.index + "]").somExpression" 

 

rest should not be an issue.

Translate