locked
Advanced Tab Code Section Not Visible (XMLtoEdit for xCollection) RRS feed

  • Question

  • Hi,

    I have 4 repeating tables on my form.  For 3 of these repeating tables I can go to the Properties -> Advanced tab and see a Code section on the Advance tab showing me the ViewContext and the XMLtoEdit for xCollection.

    On the 4th repeating table this does not appear.

    Why this inconsistency?
    Thursday, September 3, 2009 11:53 AM

Answers

  • I just tried to investigate this.  Go to the Data tab of the repeating table in the 4th repeating table,  the checkbox (Allow users to insert and delete rows) will be unchecked.  Check this checkbox, click Apply and then OK to close the repeating table property window.  Again open the property window of this repeating table, navigate to Advanced tab.  Here you should see the ViewContext and the XMLToEdit for xCollection.

    HTH.


    Regards, Paresh http://pareshs.wordpress.com/
    • Marked as answer by motionpotion Saturday, September 5, 2009 4:28 PM
    Thursday, September 3, 2009 1:26 PM

All replies

  • I just tried to investigate this.  Go to the Data tab of the repeating table in the 4th repeating table,  the checkbox (Allow users to insert and delete rows) will be unchecked.  Check this checkbox, click Apply and then OK to close the repeating table property window.  Again open the property window of this repeating table, navigate to Advanced tab.  Here you should see the ViewContext and the XMLToEdit for xCollection.

    HTH.


    Regards, Paresh http://pareshs.wordpress.com/
    • Marked as answer by motionpotion Saturday, September 5, 2009 4:28 PM
    Thursday, September 3, 2009 1:26 PM
  • SParesh,  that was the problem. 
    But I don't want users to be able to insert into this repeating table. 

    How do I stop them from inserting but also have the XMLtoEdit section for the table specified in the .xsn?
    Thursday, September 3, 2009 2:02 PM
  • Why do you want to have XMLtoEdit section?  Do you want to add rows to the repeating table programmatically?

    Regards, Paresh http://pareshs.wordpress.com/
    Thursday, September 3, 2009 2:15 PM
  • Yes.  I am writing a sorting code to allow sorting of rows in the repeating table so I need to access the xsf view similar to below that should be in the .xsn:

    XPathNavigator xnNode = this.Template.Manifest.SelectSingleNode("//xsf:xDocumentClass/xsf:views/xsf:view/xsf:editing/xsf:xmlToEdit[@name='previousMinute_408']/xsf:editWith/xsf:fragmentToInsert/xsf:chooseFragment/my:previousMinute", this.NamespaceManager);

    //Append the node from the Manifest file to the main DOM
    docXN.SelectSingleNode("/my:meeting/my:previousMinutes", this.NamespaceManager).AppendChild(xnNode.InnerXml);

    See this example: http://blogs.msdn.com/infopath/archive/2006/12/15/another-way-of-sorting-repeating-data.aspx

    It will be good if I can get it working.

    Thursday, September 3, 2009 2:27 PM
  • Thursday, September 3, 2009 4:08 PM