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

Still don't seem to understand removeInstance correctly...


Level 3

I have a repeating subform with a Delete button. In the Delete button Click event I have this code:


However, every time the Delete button is Clicked only instance 0 is removed. Naturally, I would desire the subform

containing the Delete button that has been clicked be the subform removed, not subform (0).

I have read the other posts about removeInstance but they don't seem to address my problem.

Please advise on what I am missing, Thank you!

0 Replies


Level 10





Level 3


Take the count of the subform by using the following syntax

var StrCount = SubformPath.instanceManager.count

here SubformPath is the path of the repeating subform.


Try with this option it would delete the last added subform. hope you are looking for this.




Level 3

Thanks for the responses.

I have already tried (this.parent.index) with the same results, only (0) is removed.

My goal is to be able to delete any instance of the subform, not only the last added. I'm building n instances in a sequence (primary and secondary sort keys).

The user may save the form and come back to it later if incomplete, or perhaps use one form as the template for another version with much but not all of the information the same. Unneeded instances of the subform may be anywhere and need to be deleted in any sequence.

Ideas? Thanks!


Level 10

It would be easiest so see the form. I can take a look if possible.



Level 3

Thanks Steve, I will send it along with some words of "how its supposed to work" but to double-

check does your email really have a dot before the @?



Level 3

Just checking that you received my form?




530-210-4840 cell

From: Steve L Walker <>

To: Bill Spahn <>


Sent: Tuesday, January 4, 2011 7:45:56 AM

Subject: Still don't seem to understand removeInstance correctly...

Sorry. Good catch.


Level 3

Ok, found the problem. I wan't properly qualifying the name of the Delete button. I had to add an additional "parent" to the name thus:


Just relying on ctl to give the fully qualified name was not sufficient.