Help with Repeating Table - InfoPath Dev
in

InfoPath Dev

Help with Repeating Table

Last post 04-23-2012 11:59 AM by AzuDaioh. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-20-2012 01:46 PM

    Help with Repeating Table

    I have an email form template with a repeating table with 3 columns (Comments, Email, Date):

     QC_Group
       - QC_Table
           QC_Comments
           QC_Email
           QC_Date
    QC_SendTo

     Let's say the data is as follows:

    Row1 - Comment1 - Email1 - Date1
    Row2 - Comment2 - Email2 - Date2
    Row3 - Comment3 - Email3 - Date3

    QC_SendTo should contain the email address of the previous row from the last/bottom row. 

    For example:
    If I insert Row3, I want QC_Sendto = Email2
    If I insert a new Row4, I want QC_Sendto = Email3

    How do I do this?

    I tried using QC_SendTo[last()] -- but it does not change the value from Email1.  I'm guessing last() does not refer to the last row. I tried preceding-sibling but Im still confused over it so i can't even explain how i tried it.


    Any help or guidance is greatly appreaciated.  Thank you.

  • 04-22-2012 08:08 AM In reply to

    Re: Help with Repeating Table

    Try using something like this as the default value formula for the QC_SendTo field:

    QC_Table[last() - 1]/QC_Email

    To enter this formula, you can use the Insert Field or Group... dialog to select QC_Email, then check Show XPath, and enter the [last() - 1] part.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 04-23-2012 11:59 AM In reply to

    Re: Help with Repeating Table

    Hi Jimmy,

    Thank you so much, it worked!!!

     

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