Problem getting current date/time in a repeating table - InfoPath Dev
in

InfoPath Dev

Problem getting current date/time in a repeating table

Last post 06-22-2014 02:12 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-20-2014 11:05 AM

    Problem getting current date/time in a repeating table

    Hi, I have a form that requires a separate notation for various items.  I have a repeating table set up with 3 columns - Date/Time, Note, and Initial - the date and time of the notation, the actual note or text itself, and space for the initials of the person who created the note.  It all works fine except for the date and time.

    When I enter this formula in the FX field...

    concat(number(substring(now(), 6, 2)), "/", number(substring(now(), 9, 2)), "/", number(substring(now(), 1, 4)), " - ", number(substring(now(), 12, 2)), ":", number(substring(now(), 15, 2)), ":", number(substring(now(), 18, 2)))

    It displays correctly on my form as 6/20/2014 - 10:19:58.  This is good.  BUT... when I add a second line in the repeating table to add another note, the displayed date and time will not update.  It still displays the same date and time as the note above it.  When I add a new notation say 20 seconds later, I want the form to display 6/20/2014 - 10:20:18.

    How can I change this formula using the now() function to update to the current date and time?  Or is this the best method of doing so?

    Thanks!

    Dan

     

  • 06-22-2014 02:12 PM In reply to

    Re: Problem getting current date/time in a repeating table

    Hi Dan,

    Are you using a rule or a default value? I would add a rule that sets the Date/Time column when the user initializes the form. If the rule is on the Initial column, you can just set the other column's field when it changes.

    I'm attaching a sample InfoPath 2010 form that does this with your formula.

    Hope this helps!

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.