infopath save filename like last month - InfoPath Dev
in

InfoPath Dev

infopath save filename like last month

Last post 02-15-2014 11:38 PM by zaca011. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-30-2014 06:59 AM

    infopath save filename like last month

    I'm trying to save a document under the name of the previous month, in submit coonnection for file name I set : substring(today(); 0; 8) , but with this command file has a name 2014-01 , and I need to be called 2014-00 Does anyone know how I pulled this off?
  • 02-02-2014 02:22 PM In reply to

    Re: infopath save filename like last month

    Hi zaca011,

    If you are using today() in your formula, then it would return the date today. What you may need to do here is to substitute today() with a field where it will specify the file name of which ever document you wish to update. Your formula should look similar to this:

    substring(field1, 0, 8)

    I suggest using another control such as a drop-down list whihc first queries the data in order for you to specify the document, thus making your form a lot more dynamic. Hope this helps.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-04-2014 06:43 AM In reply to

    Re: infopath save filename like last month

    thanks for reply. I don't understand what will return substring(field1, 0,8)
  • 02-04-2014 08:02 AM In reply to

    Re: infopath save filename like last month

    The substring function returns a specific part of a text string. The first argument defines the text string, the second argument defines the starting position, and the third argument defines how many characters to include.

    So if the function today() returns a value of 2014-02-04, the value for substring(today(), 0,8) now will be:

    2014-02

    Where 0 is the starting position, and 8 displays the number of characters. The formula is also equal to substring(today(), 1,7) since 0 does not really exist.

    Going back to the issue, the problem here is specifying the file name at the submit data connection wizard. So using a field from your form which generates the file name instead of the formula substring(today(), 0,8) should enable you to specify which ever file name you desire.

    After configuring this set-up, drag the field on to your canvas. Preview your form, enter the desired file name, update and submit your form. Hope this helps.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-05-2014 02:15 AM In reply to

    Re: infopath save filename like last month

    thanks but that won't solve my problem , form should be completed at the beginning of the month for the previous month and saved with the title last month
  • 02-05-2014 04:19 AM In reply to

    Re: infopath save filename like last month

    I see. May I know how you are specifying which document to update? or is this already fixed by setting each submit to a File Name - where File Name is equivalent to the previous month? If so, you may use the formula:

    substring(addDays(today(), -30), 1, 7)

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 02-15-2014 11:38 PM In reply to

    Re: infopath save filename like last month

    Sorry for late reply. It's work .Thanks.
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.