Repeating Table - Initialize new Row - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating Table - Initialize new Row

Last post 10-09-2006 12:20 PM by Shiraz Cupala. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-15-2006 05:32 AM

    Repeating Table - Initialize new Row

    Hi,
    How to initialize the newly inserted row with values from previously selected row.
    Any ideas ,

    Thanks in Advance,
    :)
  • 02-15-2006 12:43 PM In reply to

    Re: Repeating Table - Initialize new Row

    Hi,
    1. You need to have an OnAfterChange method on the repeating node.
    2. Check if e.Operation is Insert or not, if not return.
    3. Now check the e.Site.nodeName is equal to the node name that you are trying to insert.
    4. Now get the preceding-sibling of the newly inserted node.
    e.Site.selectSingleNode("preceding-sibling:NodeName");
    5. Now you can copy values from the previous node to the newly inserted node.

    Agni
    INFOPATHdev India
  • 02-21-2006 02:43 PM In reply to

    Re: Repeating Table - Initialize new Row

    Is there a reason why this does not work via rules applied to a repeating section? I have tried a rule on the repeating section (ie new inserts) to copy the value from the immediately preceding section related control to the related control in the new section. Using preceding-sibling the result always returns the original first row control value. Just curious if this is just me and my lack of understanding regarding xpath, in which case just say "yah" and I'll know its just me :) I generally do not get that involved in the UI design layer of infopath, but I thought maybe such a rule would work.
  • 10-09-2006 12:20 PM In reply to

    Re: Repeating Table - Initialize new Row

    This is old but figured I'd just wrap up the question. The reason why it doesn't work is that you can't actually attach the rule to the new insert. It might work with a default value, but I've never tried it. If you use default value, be sure to uncheck the box to update value when formula result changes. Or else changing the previous would would update the following item.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.