what i am trying to do here is copy a repeating table using InsertBefore method. The problem i am having is when i click on the copy button for the first time, copying seems to work fine which by creating a new table(2) beneath the current one(1) with the fields that i require . The problem happens when i click copy button again from first table, a new repeating table gets created before the 1st repeating table. not sure what is causing this to happen. Any help would be greatly appreciated..
Many Thanks
Please see the attached code for reference.