Sharepoint list to InfoPath repeating table - InfoPath Dev
in

InfoPath Dev

Sharepoint list to InfoPath repeating table

Last post 01-29-2010 11:41 AM by Ted Fitch. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-29-2010 09:57 AM

    • mjarrett
    • Not Ranked
      Male
    • Joined on 11-06-2008
    • Lansing, MI
    • Posts 8

    Sharepoint list to InfoPath repeating table

     Hello all. I hopefully will be able to explain what I am trying to do clearly enough so hopefully I can resolve the issue.

    I have the below secondary data source that I want populate a repeating table on an InfoPath form. When the form is submitted to SharePoint and then later reopend, I would like the check boxes of GarmentDefectSelected to be populated. The code I have provide below get's to MyaRow.AppendChild(newNode) it returns: "InvalidOperationException was unhandled by user code" and "Schema validation found non-data type errors."

     

    Main DataSource: Main Data Source 

    Secondary DataSource: Secondary DataSource

     

     <code>

                XPathNavigator DSroot = DataSources["Common Garment Defects"].CreateNavigator();
                String strDFSQuery = "/dfs:myFields/dfs:dataFields/dfs:Common_Garment_Defects";
                XPathNodeIterator DSSubs = DSroot.Select(strDFSQuery, NamespaceManager);

                XPathNavigator MyPieces = this.CreateNavigator().SelectSingleNode("/my:myFields/my:CommonGarmentDefectsGroup", NamespaceManager);
                XPathNavigator MyaRow = this.CreateNavigator().SelectSingleNode("/my:myFields/my:CommonGarmentDefectsGroup/my:GarmentDefectsGroup", NamespaceManager);

                XPathNavigator newItemNode = MyaRow.Clone();
                XPathNavigator newNode = newItemNode.Clone();

                foreach (XPathNavigator DSSub in DSSubs)
                {
                    newNode = newItemNode.Clone();
                    String strTemp = DSSub.SelectSingleNode("@Title", NamespaceManager).ToString();
                    MessageBox.Show(strTemp);

                    newNode.SelectSingleNode("my:GarmentDefectDescription", NamespaceManager).SetValue(strTemp);
                    MessageBox.Show(newNode.ToString());

                    MyaRow.AppendChild(newNode);
                }

    </code>

     

     

    Error Message

     

     

    Any idea or thoughts? Thank you.

  • 01-29-2010 11:41 AM In reply to

    Re: Sharepoint list to InfoPath repeating table

    It sounds like this is a good candidate for the Copy Tables function of our qRules product: http://www.qdabra.com/en/products/qRules.aspx

    Your code issue is probably being caused by the nil attribute (usually the source of that particular error).

    Ted

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.