insert Item in Repeating section on Even Change - InfoPath Dev
in

InfoPath Dev

insert Item in Repeating section on Even Change

Last post 10-21-2008 01:13 PM by Shiva. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 10-20-2008 02:32 PM

    insert Item in Repeating section on Even Change

    I have a question.  Is it possible to insert item in a repeating section on change event?  Like instead of clicking on insert item, I want two items to open at once.

    Thanks a lot.

  • 10-20-2008 07:45 PM In reply to

    • Harij
    • Not Ranked
      Male
    • Joined on 10-21-2008
    • Posts 5

    Re: insert Item in Repeating section on Even Change

    Can you explain in more detail?

  • 10-20-2008 08:15 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: insert Item in Repeating section on Even Change

    Hello, Here is the code to insert the node in onAfterChange event, if(eventObj.Operation != "Insert" || changedValue)
      {

         return;
      }

    changedValue = true;XDocument.View.ExecuteAction("xCollection::insert", "repeatingGroup_2")changedValue = false; Here is ‘changedValue’ is boolean type and you have to declare it in global and by default value is fale.
  • 10-21-2008 08:36 AM In reply to

    Re: insert Item in Repeating section on Even Change

     It worked thanks a lot!

  • 10-21-2008 11:57 AM In reply to

    Re: insert Item in Repeating section on Even Change

    I got another question, how do I access specific row in that repeating section with JScript thanks a lol.

  • 10-21-2008 01:13 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: insert Item in Repeating section on Even Change

    Hello,

    If you know specific row number then you can use the below code to get the node,

    Var row = XDocument.DOM.selectSingleNode("RepeatingNodeXPath[RowNumber]");

    RepeatingNodeXPath - Repeating node XPath ("my:myFields/my:group1/my:group2")

    RowNumber - Row Index number (specific row number)

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