populate text field with last repeating table - InfoPath Dev
in

InfoPath Dev

populate text field with last repeating table

Last post 05-20-2008 03:25 PM by bezonato. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 05-25-2006 12:22 PM

    populate text field with last repeating table

    I have a repreating table with a dropdown field that displays the users name. Its set up so that when a new user enters data into the form, they add a new repeating section, drop the menu to thier name and input data. This way we can keep track of individual user input as well as dates.

    I need a new text field that displays the LAST user in the repeating section. SO if 3 sections have been added, the new field displays the last user, or current user.. same function

    I was trying to use the "last()" function, but not sure if thats working. I need it to work the same way Sharepoint works, where you can display the current field in the "LAST" repeating table

    It keeps displaying the needed field in first repeating section...

    any suggestions?
  • 05-26-2006 01:28 PM In reply to

    Re: populate text field with last repeating table

    Hi,
    Is it an Expression box then use this kind of "XPath"
    "../repeatingNode[position() - 1]/user", check out if this helps.
    If that doesnot help you can use this
    "preceding-sibling::repeatingNode/user"
  • 05-31-2006 09:18 AM In reply to

    Re: populate text field with last repeating table

    I dont quite understand the expression. My repeating table is named "../my:TimeTracking" and the field within that table is named "../my:TimeTracking/my:TTemployee"

    Im trying to populate a text field, outside of the table, with the last "../my:TimeTracking/my:TTemployee" repeating section

    I found a work around where the user has to create another repeating section ABOVE the current section... so that my field displays the current TOP repeating table

    thanx for the help
  • 05-31-2006 12:42 PM In reply to

    Re: populate text field with last repeating table

    You can try "../my:TimeTracking[last()]/my:TTemployee". This should work if you are getting the last "TimeTracking" node.
  • 06-01-2006 08:22 AM In reply to

    Re: populate text field with last repeating table

    works like a charm.. thanx

    can you possibly tell me how that is working?

    thanx again
  • 06-01-2006 10:03 AM In reply to

    Re: populate text field with last repeating table

    Good to know that its working fine.
    Here is how its working
    You said "my:TimeTracking" is the repeating node, and you need "my:TTemployee" of the last "my:TimeTracking" node. You get it by filtering the "my:TimeTracking" nodes to get the last one by putting the "last()" filter on it.
  • 05-20-2008 03:25 PM In reply to

    Re: populate text field with last repeating table

    anyway to do the same in a web enabled form?

     the last function is not compatible for some reason.

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