Repeating Table copy previous record - InfoPath Dev
in

InfoPath Dev

Repeating Table copy previous record

Last post 08-23-2016 02:54 PM by TracyK. 35 replies.
Page 2 of 3 (36 items) < Previous 1 2 3 Next >
Sort Posts: Previous Next
  • 10-17-2009 11:15 PM In reply to

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

    Hi Jimmy,

    Please find attached the screen shot for the default value that i am trying to set.

    Please note that even though i am using IP 2007 at home, i use IP 2003 at office.

    Please help what exactly i need to put in the preceding-sibling attribute.

    Thanks.


    Thanks,
    Kiran
  • 10-18-2009 08:43 AM In reply to

    Re: Repeating Table copy previous record

     If you want to always copy the value from the previous row, use

    ../preceding-sibling::d:Table1[1]/@Reviewer

    If you want to always copy the value from the first row, use

    ../d:Table1[1]/@Reviewer

    but this should be set in the node's properties, not in the form's Default values dialog.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-18-2009 08:56 AM In reply to

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

    Re: Repeating Table copy previous record

    Please  let me know how do i set the node's property ?

    Thanks,
    Kiran
  • 10-18-2009 09:15 AM In reply to

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

    Re: Repeating Table copy previous record

    yep, got it now. Was missing the node setting as well as the ../ before mentioning the preceding-sibling. Thanks a lot :)

    Thanks,
    Kiran
  • 10-21-2009 05:05 AM In reply to

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

    Re: Repeating Table copy previous record

    Got the preceding-sibling usage for the node alright. Now i am able to copy over the values from the previous section to the next section in my form.

    When i submit it to the MS access table, it saves the values alright. But when i query the information, i am seeing blanks in all those fields for which i had implemented the preceding-sibling. All other values which were manually entered in the section are visible. Could you please help me in knowing what's going wrong here.

     

    Thanks,
    Kiran
  • 10-21-2009 09:49 PM In reply to

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

    Re: Repeating Table copy previous record

    Got the solution to this. I just went ahead and unchecked the feature which says 'Update this value when the result of the formula is recalculated' which appears below the formula.

    Thanks,
    Kiran
  • 07-18-2012 02:00 PM In reply to

    Re: Repeating Table copy previous record

    Hi Hilary, my name is Bob and I am trying to a little beyond using SP straight out-of-the-box; I am not a developer only a hacker per-se.  I am using SP/IP 2010 and have been trying to use your example with my setup.  What is happening is that when I try to enter data into my test field it wipes out the data?  For the Text Box Prop here is what I am using:

     ../preceding-sibling::my:SharePointListItem_RW/my:Description

  • 07-18-2012 02:47 PM In reply to

    Re: Repeating Table copy previous record

    So, you are using that in your default values? And when you enter a new row, it gets the value of the row before? I'm sorry, I don't quite understand - if you could give a bit more detail / attach your temlate to the Options tab, that would help.

    Hilary Stoupa

  • 07-18-2012 04:08 PM In reply to

    Re: Repeating Table copy previous record

    In advance, I really appreciate your assistance.  Brief summary of what I have and trying to do.  List using a InfoPath form with Repeating Table to track staff time entries.  My form has a mixture of Lookup/Choice, Choice, Single line of Text and Multi lines of Text fields.  I used this fields to capture my staff's time entries which write to a list.  The Repeating Table has made it much easier for staff to enter time data.  A requested enhancement is to when data entry for a new row (last) is complete and that upon the Insert function it inserts a new row but it also carries over the data entered of identified fields using preceding-sibling.  This is what my schema looks like.  I am trying to test preceding-sibling using the Description field.

  • 07-18-2012 04:16 PM In reply to

    Re: Repeating Table copy previous record

    I think this will do what you want:

    ../preceding-sibling::my:SharePointListItem_RW/my:Description

    Save the form linked in this reply locally, right click the file and select Design to open in design mode.

    Hilary Stoupa

  • 07-18-2012 04:51 PM In reply to

    Re: Repeating Table copy previous record

    Thank You, it is working and carrying over data.  Unfortunately, I left a requirement out of my description.  Besides carrying over the data when a new row is added, I need it to carry over the data from the last row.  I also need the data carried over to be able to be updated as maybe some fields are Ok to be carried over but it is possible that a field or two may need to be updated.  So in this instance when a a field or two is updated this updated data carries over to the next new row to be inserted. I did try [Last()] as I thought I saw it in a previous post, couldn't get it to work.  Do you think it is possible for the preceding-sibling to grab the last row?  Thanks
  • 07-18-2012 05:02 PM In reply to

    Re: Repeating Table copy previous record

    I think it would be:

    ../preceding-sibling::my:SharePointListItem_RW[1]/my:Description

    Hilary Stoupa

  • 07-18-2012 05:09 PM In reply to

    Re: Repeating Table copy previous record

    I cannot express how much I appreciate your help and expertise.  The functionality that I was seeking is working is my Test SP site/list.  I will expand to the other fields where I need this functionality.  I will let you know tomorrow how it goes.

  • 07-18-2012 05:15 PM In reply to

    Re: Repeating Table copy previous record

    Hey, fantastic, glad it is working for you - here's a little blog post that may help with the syntax.

    Hilary Stoupa

  • 07-19-2012 10:39 AM In reply to

    Re: Repeating Table copy previous record

    Good Day, I ran into an issue when trying to apply the preceding-sibling on Drop-Down List Box Control.  The syntax with [1] does populate the new row with the data from the previous row.  What happens when going beyond two rows on this type of control is that it refers to the first row value on the active form.  When trying this on a Text Box field I am able to update the copied value let's say on the 3rd row to something else and upon the insert it carries over to the next row without issue.  When trying this technique with a Drop-Down List box it always copies the value from the first row.  Can you please advise whether the repeating table value cannot be performed on a Drop-down List box fields.  I have also attached my Template.xsn, Thanks Bob
Page 2 of 3 (36 items) < Previous 1 2 3 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.