Repeating Table copy previous record - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating Table copy previous record

Last post 08-23-2016 02:54 PM by TracyK. 35 replies.
Page 1 of 3 (36 items) 1 2 3 Next >
Sort Posts: Previous Next
  • 06-12-2009 01:26 PM

    Repeating Table copy previous record

    Hello,

    Is there a way to have a repeating table copy the record prior to create the "new record"?  If so and anyone could post code, I'd be very appreciative.

    Thank you,

    Roger

  • 06-12-2009 03:53 PM In reply to

    Hi -- so what you want is when you insert a new row in a repeating table, the new row has the same values as the previous row? You can use preceding-sibling for this, no code required. I've attached a sample to the header of this reply. Right click the link and select save as to save locally. Then, right click the local copy and select design. Preview the form to try.

    Hilary Stoupa

  • 06-12-2009 04:49 PM In reply to

    Re: Repeating Table copy previous record

    Exactly.  Thanks!

     Do you think you could reccomend a good overall InfoPath book?

  • 06-15-2009 04:31 PM In reply to

    Re: Repeating Table copy previous record

    Patrick Halstead's book is fantastic, but I'm really hot on these labs right now, because I think the hands on experience is fantastic. While these are written with IP 2003 in mind, the basics hold true through 2007, though the code object model changes....

    Hilary Stoupa

  • 07-01-2009 02:13 PM In reply to

    Re: Repeating Table copy previous record

    Hilary,

    I have used this techniques successfully several times... and most recently have migrated it into another form where I have a repeating section with a field that I would like to autonumber...

    I cannot however seem to make this code work in this form... see attached simplified form

    Any ideas

    Note: I have another form where this exact same code is working just fine in a repeating section...

  • 07-10-2009 02:50 PM In reply to

    Re: Repeating Table copy previous record

    I was able to install that function, no problem.  The problem is, I thought that if someone keyed over the copied line above it, when submitted it wouldn't revert back to copying the line above it.  Is there a way to keep the functionality of copying the above row when you create a new one, but if someone keys something it "sticks"?


    Thanks,
    Roger

  • 07-10-2009 02:57 PM In reply to

    Re: Repeating Table copy previous record

    ^Nevermind.  I just unchecked that box to update on submit or whatever.

    Thanks,
    Roger

  • 07-10-2009 03:09 PM In reply to

    Re: Repeating Table copy previous record

    I am so sorry, I didn't see this post! Attached is a fixed copy, as you probably guessed it was the xpath in your count formula....

    Hilary Stoupa

  • 07-30-2009 11:07 AM In reply to

    Re: Repeating Table copy previous record

    I don't know what my problem is, but I can never get the repeating tables to work with preceding-sibling.

    I have a repeateing table setup.  It's called Group4.

    preceding-sibling::group4[1]/PROD_ID

    ^That's what I'm putting in the formula, but it's saying: "preceding-sibling::group4/PROD_ID" does not point to a valid location path of a field or group.

     What am I doing wrong?

     

  • 07-30-2009 12:05 PM In reply to

    Re: Repeating Table copy previous record

    I figured it out finally.  Man, the devil really is in the details.

     

  • 10-11-2009 09:25 PM In reply to

    • kiranps
    • Not Ranked
    • Joined on 08-08-2009
    • Bangalore, India
    • Posts 16

    Re: Repeating Table copy previous record

    Hi rconverse,

    Could you please tell me what correction you made to get this problem resolved. I am also getting the same issue.

    Thanks.

    Thanks,
    Kiran
  • 10-11-2009 09:31 PM In reply to

    Re: Repeating Table copy previous record

     Did you attempt the solution I offered you?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-11-2009 09:38 PM In reply to

    • kiranps
    • Not Ranked
    • Joined on 08-08-2009
    • Bangalore, India
    • Posts 16

    Re: Repeating Table copy previous record

    Ya Jimmy, i tried your recommendation. But i guess i am missing something.

    Assuming the following, would you be able to help >

    * There is only one primary data source.

    * The table is called 'Review'

    * The datafield is called 'Reviewer'

     

    Thanks.

     

     

     

    Thanks,
    Kiran
  • 10-11-2009 09:46 PM In reply to

    Re: Repeating Table copy previous record

     Could you attach that screenshot of your data source that I requested?  That would make it easiest to know what the exact node prefixes and relative locations are.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-12-2009 09:17 AM In reply to

    Re: Repeating Table copy previous record

    This what I enede up as a formula.

    preceding-sibling::group8[1]/PROD_DESC

    HTH,

    Roger

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