Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

add, remove two rows

Avatar

Former Community Member

I am new to Livecycle. I have created a table where I can add one row and delete one row. What I am trying to achieve, is to be able to add two rows and remove two rows at the same time.

Is this possible?

thank you

4 Replies

Avatar

Level 2

for starters, you can use the action builder.. that should be pretty easy to figure out for you.

for easyness sake, call the function/code that adds one row - twice!

Code will be along the lines of:

Table1.Row1.instanceManager.addInstance(1);

Table1.Row1.instanceManager.removeInstance(Table1.Row1.index);

Avatar

Former Community Member

Yes, I got this code but what I am trying to do is to add two rows at the same time not one.

Avatar

Level 2

Use the action builder as described before.

In order to do two rows at the same time you'll have to:

In you're Heirarchy panel, Control Select Row1 and Row2.

Then right click and choose "Group as Selection"

Now select your AddBtn and add the actionbuilder code.

Contition: When button addBtn is clicked

Result: Add a new Instance of selectionGroupedRows

now when you test and click the add button, both rows will duplicate. Do the same thing for the delBtn.

Hope this helps.