Expand my Community achievements bar.

SOLVED

instanceManager row above

Avatar

Level 3

Hi Everyone,

I think I have a common problem and there is probably an easy solution. I hope.

I have a dynamic table with an ADD button in the header row and with DELETE buttons in all the rows after that.

The idea is that I can add as many rows as I want and then delete them if I want. Standard stuff.

The problem is that each delete button will delete the row above it. I want it to delete the row it is in.

Here's my code:

form1.dynamic_tables.table_holder.item_price_table.Row1.Button6::click - (JavaScript, client)

item_price_table.Row1.instanceManager.removeInstance(1);

Obviously I am getting something wrong with the argument for removeInstance, but I don't know what it is.

Many Thanks,

Joe

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Joe,

The parameter for the removeInstance is the instance that you want to remove, based on a zero numbering system. So this should work:

item_price_table.Row1.instanceManager.removeInstance(this.parent.index);

Good luck,

Niall

Assure Dynamics

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Joe,

The parameter for the removeInstance is the instance that you want to remove, based on a zero numbering system. So this should work:

item_price_table.Row1.instanceManager.removeInstance(this.parent.index);

Good luck,

Niall

Assure Dynamics

Avatar

Level 3

Hi Niall,

Yup...perfect. Thanks. Joe

PS...What does your company do? Do you make smart Livecycle forms for people? I think I'd like to talk to you about this. joseph.johnson@acegroup.com