Repeating table in Browser enabled Infopath form. - InfoPath Dev
in

InfoPath Dev

Repeating table in Browser enabled Infopath form.

Last post 11-04-2009 04:28 AM by Qazi Anis. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-02-2009 06:11 AM

    Repeating table in Browser enabled Infopath form.

    I have a repeating table where i can add multiple items,i have a button at the bottom of the form as submit button.Each row of the repeating table is a new item for me.I want that on row submit each and every row of repeating table should be stored as a new item in form library or in any other list. Is it possible to achieve this.If yes,pls tell me the way to proceed.I'm in middle of a very crunch situation, any help would be highly appreciated..

    Vishal Srivastava
    Senior Software Engineer
    SDG Software Pvt Ltd
  • 11-04-2009 04:28 AM In reply to

    Re: Repeating table in Browser enabled Infopath form.

    hi vishal.

    you will have to write custom code for this.

    sample code: -

    string path = null;

    SPSite thisSite = null;

    SPWeb thisWeb = null;

    SPList thisList = null;

    SPListItem item = null;thisSite = new SPSite("site_path");

    thisWeb = thisSite.OpenWeb();

    thisList = thisWeb.Lists["list_name"];

    XPathNavigator xpn = this.MainDataSource.CreateNavigator();

    XPathNodeIterator listItemNav = xpn.Select("my:myFields/my:group8/my:group9", this.NamespaceManager);

    for (int j = 1; j <= listItemNav.Count; j++)

    {

    item = thisList.Items.Add();

    string abc1 = xpn.SelectSingleNode("my:myFields/my:group8/my:group9[" + j + "]/my:field7", this.NamespaceManager).Value;

    string abc2 = xpn.SelectSingleNode("my:myFields/my:group8/my:group9[" + j + "]/my:field8", this.NamespaceManager).Value;

    string abc3 = xpn.SelectSingleNode("my:myFields/my:group8/my:group9[" + j + "]/my:field9", this.NamespaceManager).Value;

    item["column1"] = abc1;

    item["column2"] = abc2;

    item["column3"] = abc3;

    item.Update();

    }

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.