Please Help me about getting filename for submission. - InfoPath Dev
in

InfoPath Dev

Please Help me about getting filename for submission.

Last post 12-06-2012 05:33 AM by appelgw. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 10-03-2007 07:01 AM

    Please Help me about getting filename for submission.

    And the other one problem, I want to know how about I can get filename (of Infopath form) by using Infopath function. Because filename is generate at first my submission. So at the other submission I want to know about function that using for get filename.

    How should I do?

    Thank you very much.

    インフォパス ● デべロッパー
  • 10-03-2007 07:34 AM In reply to

    Re: Please Help me about getting filename for submission.

    Are you trying to set a specific filename? You can use a function to use field values or create your own naming scheme.

    Where are you storing your forms? SharePoint, a file share? There are ways to query SharePoint to get ID numbers and file names,

     

    I guess I need more detail of what exactly you need.

  • 10-03-2007 09:41 AM In reply to

    Re: Please Help me about getting filename for submission.

    Thank you very much for your reply.

    These are my detail.

    I created my Infopath form template and publish to SharePoint Document Library in specific site. At first of operation, user create new form (from my created template) and then user submit at first time for file creation into document library, this new file name is generated from xxxx + now() function. (That I set "Main submit" in data connection).

    After that, user re-open this file for edit. And then user submit form again for saving data (I don't want to use save function), I want to use "Second submit" data connection that I want to use the same file name (Gereated at first time) for this submission.

    Please suggest me for solving solution by using function fx at Data Connection Creation.

    Or if you have other solution, you can suggest me for additional information.

     

    Thank you very much again.

    インフォパス ● デべロッパー
  • 10-03-2007 09:53 AM In reply to

    Re: Please Help me about getting filename for submission.

    I believe there is code for getting the current file name of your form.

    One easy trick is setting a field (FormName) in your form to the function xxx+ now() right before submit then use that field as the name of your form.  Have a rule that on the submit button if FormName is blank (new form) run the action to set it to xxx+now(). Otherwise if it has a value it will not be changed and on future submits it will continue to use that field value.

  • 10-03-2007 11:21 AM In reply to

    Re: Please Help me about getting filename for submission.

    Thank you very much for quick reply and Do you have another solution more ? If you have ,please kindly to tell me because I have some limitation about I can't add more field from the existing. Thank you very much again
    インフォパス ● デべロッパー
  • 10-09-2007 03:15 AM In reply to

    Re: Please Help me about getting filename for submission.

    Hi

    Taking Clay's suggestion a little further, are there any fields on the amended version whose data are different to a new form.  This difference can be used to drive the situation Clay specifies without adding extra fields.

    Cheers Adam

    Adam Harding
    Wales
    UK
  • 12-06-2012 05:33 AM In reply to

    Re: Please Help me about getting filename for submission.

    I took Clay's idea and got it to work.  Here's my version of a solution.

    1) Create a text field on the form called FormName
    2) Create a Retrieve data connection that gets the IDs from the form library
    3) Create a On Form Load rule with criteria of 'If FormName is blank' do action of 'Set a field's value: FormName = max(ID)+1' where ID is from the Retrieve data connection
    4) Set the Submit data connection to use 'FormName' as the file name and allow files to be overwritten.

    The result is that on new forms, the FormName is set to the next incremental ID value of the IDs of the forms in the form library.
    And then on forms that are being edited, it does nothing to the value stored in FormName so the submit action just saves over top the existing form.

    Greg W Appelt
    Filed under: , , ,
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.