Using the today() function - InfoPath Dev
in

InfoPath Dev

Using the today() function

Last post 07-25-2008 05:54 AM by jrudolph. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-24-2008 03:42 PM

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Using the today() function

    I have a form where I use the today function to pre-populate the date of a form that a user fills out and there are some other fields withhin the form that also use the function in conjunction with other functions, for internal purposes to automatically fill in certain parts of the same form before the infromation is uploaded into our accounting system.  Once the user submits the form it is saved into a SharePoint document library and then once it is approved, it is saved "on top" of the original pending form as "approved" and awaits to be exported for importing in to our accounting system.

    The problem I am encountering is that since the today() function returns the obvious, today, if a user fills out a form on the 1st of the month, the reviewer opens the file to approve it on the 15th, approves it and then saves it to the document library, and then the file, along with all other approved files, is uploaded on the 1st of the subsequent month, all of the dates are different and cause problems. 

    Ideally I dont want the user to enter the date (this is because the form is meant for mouse clicks, drop down menus, radial buttons, etc... only and no keystrokes), and like I mentioned above I also have a couple other boxes using the today() function to return a value which is supposed to return the value based ONLY on when the user first submits the form.  For instance in one case the form is returning the next month and current year only, which is being used as part of the file upload criteria.

    So now my question, is there a way to use the today() function when the file is originally opened and then have it "freeze" on that date when it is submitted, and not changed when subsequently approved and saved in the database?  Im taking a wild guess that if it is it requires some programming knowledge, but im hoping not.

    I hope this makes sence and any help on this would be greatly appreciated.

  • 07-24-2008 03:50 PM In reply to

    Re: Using the today() function

    Hi --

    You can set the default value of one of your fields to today() and deselect the Update this value when the result of the formula is recalculated check box.

    Then, in your other formulas that were using today(), you can use that field.

    Hilary Stoupa

  • 07-24-2008 03:54 PM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: Using the today() function

    Well that was incredibly simple.  So just to make sure that I am on the same page as you.  With that box unchecked, when the form is reopened the date will remain the same as it was when it was FIRST created, correct?

     

  • 07-24-2008 05:37 PM In reply to

    Re: Using the today() function

    Yes, it certainly should. You can always test it with now(), if you like -- set a box to now(), deselect the update option, preview the form and save -- when you re-open, the field will be whenever now() was when you previewed....

    Hilary Stoupa

  • 07-25-2008 05:54 AM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: Using the today() function

    Thanks again, I got it all figured out now.  That was incredibly simple.

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