Qrules - trying insert on repeating field in repeating group but getting "Failed to insert child". - InfoPath Dev
in

InfoPath Dev

Qrules - trying insert on repeating field in repeating group but getting "Failed to insert child".

Last post 09-09-2011 08:06 AM by Jimmy. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-09-2011 07:11 AM

    Qrules - trying insert on repeating field in repeating group but getting "Failed to insert child".

    Hi,

    I am using qrules 3.1 and infopath 2007.

    I am struggling to insert a child of a child... I have read some of the other posts and have got a bit further - i.e. that I need to have the xpathsrc, but I now have the "failed to insert child" message.

    The relevant portion of the data structure is attached.

    I am wanting to add a further my:InterfacingSoftwareInformation node.- to a specific InterfacedApplication

    The command I am using is...

    Insert /parent=/my:myFields/my:Interfaces/my:InterfacedApplicationGroup/my:InterfacedApplicationList/my:InterfacedApplicationInformation[./my:InterfacedApplication = "0000404"]/my:InterfacingSoftwareInformationGroup /child=my:InterfacingSoftwareInformation /xpathsrc=/my:myFields/my:Interfaces/my:InterfacedApplicationGroup/my:InterfacedApplicationList/my:InterfacedApplicationInformation/my:InterfacingSoftwareInformationGroup/my:InterfacingSoftwareInformation

    I am using the insert command from code - setting the value of the QdabraRules datasource Command field to be the command above.  This has worked very well for other scenarios.

    In the code I have checked that the /parent xpath returns a valid node.

    I cannot see where I am going wrong.  Could someone give me a pointer ?

    Thank you

    Catharine


    Filed under:
  • 09-09-2011 07:55 AM In reply to

    Re: Qrules - trying insert on repeating field in repeating group but getting "Failed to insert child".

    Hi Catharine,

    From a glance, it looks like it should work. The quickest thing may be to get your form and run it in debug. Can you send it to us?

    Thanks.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-09-2011 08:06 AM In reply to

    Re: Qrules - trying insert on repeating field in repeating group but getting "Failed to insert child".

    Hello Catharine,

    The issue is the structure of your data source.  InterfacingSoftwareInformation has that Attributes sibling after it, so when qRules tries to insert the new node, it tries to add it after Attributes, and that creates a schema validation error.

    Is there any possibility you could modify your data source so that InterfacingSoftwareInformation has its own exclusive parent, perhaps by creating a group called InterfacingSoftwareInformationItems as a child of InterfacingSoftwareInformationGroup and the parent of InterfacingSoftwareInformation?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.