Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

instanceManager row above

jjohnsonace
Level 3
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
Niall_O_Donovan
Correct answer by
Level 10
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
Niall_O_Donovan
Correct answer by
Level 10
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

jjohnsonace
Level 3
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