Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Remove instance after reopening saved form

$
0
0

Hi All,

 

I have a simple meeting form with add/remove row buttons for actions table. This table is hidden to start off with, and is made visible with another button.

Add Instance Code

Form1.MinutesSection.ActionsTable.Section.Row1.add_row::click - (JavaScript, client)

_Section.addInstance(1);

xfa.form.recalculate(1);

 

Remove Instance Code

Form1.MinutesSection.ActionsTable.Section.Row1.remove_row::click - (JavaScript, client)

 

// Prompt the user

var nResponse = xfa.host.messageBox("You are about to delete this Task. \n\nDo you want to continue?", "Delete row", 2, 2)

 

// Test the response: Yes = 4

if (nResponse == 4) {

 

// Invoke the Instance Manager to remove the current instance of the detail subform. required .parent.parent.parent.

_Section.removeInstance(this.parent.parent.index);

 

// Invoke the recalculate method to update the form calculations.

xfa.form.recalculate(1);

}

 

The buttons generally work great. However, if I was to add some instances to the table and then save the form to come back to to it, I'm unable to remove the instances "rows" that were added to the actions table before saving, closing and reopening the form. I can only add new rows and remove the new rows, but not the ones added prior to the reopening the form.

 

Is there a way to allow the user to delete previously added instances?

 

Thanks in advance.

 

I am using LiveCycle Designer ES2, Note I'm a beginner when it comes to coding.


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>