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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Remove a table row with a button in Livecycle Designer ES3

Imgoodtogo
Level 2
Level 2

I have a table in Livecycle that has 16 static rows. More rows can be added or removed dynamically at the end of the table.

I would like the user to be able to delete one of the static rows if they want however I can't get the script to work.

I have a button at the end of the row with the script:

driverTable._Row2.removeInstance(true);

I have tried various forms of this script such as not using the shorthand for "instanceManager", leaving "true" out, etc. Where it says "Row2" I would use this script for the subsequent rows, Row3, Row4 etc.

I have tried it with the initial count set to 1 and tried it set to zero. The table is in a flowable subform.

Can anyone help?

1 Accepted Solution
Magus069
Correct answer by
Level 10
Level 10

HI there,

A row cannot be set to 0 instances, if you want to remove a row, you will have to hide it using its presence property...

But if you are using 1 table for 16 different rows, why are you not setting the table with dynamic rows and have an initial count to 16, then you could remove any rows you want with the removeInstance method

View solution in original post

2 Replies
Magus069
Correct answer by
Level 10
Level 10

HI there,

A row cannot be set to 0 instances, if you want to remove a row, you will have to hide it using its presence property...

But if you are using 1 table for 16 different rows, why are you not setting the table with dynamic rows and have an initial count to 16, then you could remove any rows you want with the removeInstance method

View solution in original post

Imgoodtogo
Level 2
Level 2

That's brilliant.

I hadn't thought of doing it that way.

I just tried it and Voila! No problem.

Thank you so much for your response.