Repeating table and value from previous row - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating table and value from previous row

Last post 11-02-2011 05:46 AM by Karsten Brocksieper. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-02-2011 05:19 AM

    Repeating table and value from previous row

    Hello,

    I would like to set the value of a textfield in a repeating table with exact the same value from the same field in the previous row. In my humble opinion I have thought that I can do this with the following formula as the 'Default value' and uncheck the option 'Refresh value when formula is recalculated'.

    ../preceding-sibling::my:RepeatingGroup[count(../preceding-sibling::my:RepeatingGroup) = count(current()/../preceding-sibling::my:RepeatingGroup) - 1]/my:One_Of_MyFields

    Unfortunately this works only for the second row --- but no more for the following inserts.

    Can anyone help me that in every case the value in the new inserted row is taken from the same field in the previous row.

    Thank you very much for any help.

    Regards,

    Karsten
  • 11-02-2011 05:33 AM In reply to

    Re: Repeating table and value from previous row

    How about this:

    ../preceding-sibling::my:RepeatingGroup[1]/my:One_Of_MyFields

     

    Incidentally, your approach should work, and it did work when I tried it.  This part is incorrect:  count(../preceding-sibling::my:RepeatingGroup); it shouldn't have the ../ in it, but that may have just been a typo when you were entering it here in the forum.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-02-2011 05:46 AM In reply to

    Re: Repeating table and value from previous row

    Hi Jimmy,

    ...Life can be soooo easy... :-)

    That´s it !!!

    Thank you very much for your quick help...

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