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

How to Add and Remove fields or table

Avatar

Avatar
Level 1
Shekharmine
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Shekharmine
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
Shekharmine
Level 1

31-07-2017

I have a new form created.

i want to duplicate particular fields. like

when user click "Add" button, the desired field should be added below the field.

and next to the field there should be "Add" and "Remove" buttons.

when click on "Remove" button, the field should be deleted.

see the attachment once.

Untitled-1.jpg

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Level 1
SamJH
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
SamJH
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
SamJH
Level 1

08-08-2017

I have a table with the following row:

screengrab1.jpg

The structure in the Hierarchy panel is:

screengrab2.jpg

To add another row to this table I use the following on the ADD button:    

previousNames.Row1.instanceManager.addInstance(1);   

To remove a specific row from this table I use the following on the REMOVE button:   previousNames.Row1.instanceManager.removeInstance(this.parent.parent.index);

**using .removeInstance(1); removes a row but not the specific one selected**

To add or remove an entire section, eg a complete table:

Wrap the table/section of content in a subform.

Make sure your add/remove buttons are also included within the subform.

Select the subform in the Hierarchy panel.

Go to the Binding tab in the Object panel.

Check the box 'Repeat Subform for Each Data Item' - Min Count should be 1

Add button:  _subformName.addInstance(1);  

Remove button:  _subformName.removeInstance(subformName.index);

(where subformName is the name of YOUR subform)

I hope this helps. I was looking for this solution for weeks and was having to do trial and error of any solutions I did find online until I got one that worked. I've included the screen grabs so you can see how it relates to my structure and amend it to suit yours accordingly.