The problem I'm having is that the last node in a repeating table is duplicated into the first position of said table eg:

  • 3
  • 1
  • 2
  • 3

I've got a statement that deletes this node:

   //OrganismResults is the repeating group
   XPathNavigator xpDuplicateOrganismNode = xpNav.SelectSingleNode("
       /my:myFields/my:OrganismResultData/my:OrganismResults[1]", NamespaceManager);


However, I have a repeating table within a repeating table that is creating a lot of duplicate data. Is there an easy way to prevent this from being created and therefore deleted?


I do not know what logic you have in your form that is causing this to happen - a screenshot of data structure and/or the filled out form would help, as would any additional code that applies to this table.

However, in InfoPath, you can set Default Data to not include the initial instance of a repeating node. In InfoPath 2013, the option is on the data tab of the ribbon, Default Data, and the dialog lets you deselect any nodes you do not want included by default. So - if the issue is that the presence of a default node is causing the problem, setting the repeating group to not be included by default may solve it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.