Search code examples
submitinfopath

Retain original InfoPath submit date in form


The form is submit to email. I want to get the date of the submit as a variable. Setting a variable with now() is not adequate as the variable changes when the form is opened again after submission.


Solution

  • Some possible solutions:

    1. Simply create a field in your form, set its default value to the now() function, and uncheck "Update this value when the result of the formula is recalculated." and you should be all set.

      via http://www.infopathdev.com/forums/p/12569/44295.aspx#44295

    2. Create a variable submissionDate to store the submission date. When the user submits the form, set submissionDate to the current date. Add a check to only set the date if the variable does not already contain a value. If not implemented this exact way, this idea could be used in some form. I don't see why it wouldn't work.

    3. Similar solution to #2 suggested here: I need a submit date that doesn't change.

      You just need to add a field to your form which saves the original file name.

      Have a rule on open which if filename is blank, sets is to your concat (addedtotable, ID). Then in your SP submit use this field as the file name.

      On subsequent opens since it has a value the file name will not change.

      On your exisitng forms you will need to manually set this since you want to retain the original file name but on any new this solves your issue.

      Another option is to query the document library and maybe look for your user's name if you identify the user and the most recent file they have opened.

    4. A few more suggestions here: Submitting Infopath forms to a Sharepoint Library - how can I generate a unique name for each record.