Formatting File Name - InfoPath Dev
in

InfoPath Dev

Formatting File Name

Last post 07-31-2008 09:58 PM by nbarkhina. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 03-06-2008 08:47 AM

    Formatting File Name

    I finished creating a form template using InfoPath 2007and used the Publishing Wizard to publish the form to a Forms Library on SharePoint 2007.  The last step of the wizard asks to name the file, is there a way to format the file name a specific way (For example, RANK_LASTNAME_STARTDATE)  ??   Where RANK, LASTNAME and STARTDATE are fields on the form.    

  • 03-06-2008 09:22 AM In reply to

    there sure is.  On that last step, you select the function or equation box to the right of the file name box.  Use the concat function and you can add the fields right there.

    Another option would create a field that has the filename in it already(using the concat function) and just selecting that text box for the file name in setting up your data connection.

  • 03-06-2008 10:03 AM In reply to

    Barmatt80:

    Thanks for the reply !  I have tried your procedures using the fx button to no avail.  Correct me if I am wrong, do i need to be in design mode on the form and then do the following:    Tools --> Submit Options --> Allow users to submit this form (checkbox).  Click on "SharePoint document library"  then click on "Add" then I see the "Fx" or formula box.  In the Insert Formula Box:  I see 3 buttons (Insert Field or Group, Insert Function, Verify Fomula).  I click on "Insert Field or Group" button for RANK.  I do the same for LastNAME and StartDate fields so it looks like this:  RANK + LASTNAME + STARTDATE then click on OK button.  

    After accomplishing this, do i now go to FIle --> Publish  ...??  and then test out the form

     

     

     

     

  • 03-06-2008 12:37 PM In reply to

    You would want to use the Insertfunction and select concat first.

    concat(RANK, ",", LASTNAME, "-", STARTDATE) or maybe you do not want the seperating characters but that would be the syntax.

    I would probably add a field to your form. Add a rule on submit that sets the field to this formula if it is blank. That way it gets set on the initial submit but not on subsequent where posisbly this data could change.  This way you have the filename in your document for future reference.

    Then just use this field as the file name in submit connections.

    When your form is complete then publish out to SharePoint.

  • 03-07-2008 07:31 AM In reply to

    How would you "insert a rule on submit that sets the field to this formula....." ?  I used the Insert Function Concat (Rank, LastName, StartDate) minus the seperating characters and get this error.

    InfoPath can't submit the form.  An error occured while the form was being submitted.  The folder (directory path) does not exist.

    I am thinking I need to CORRECTLY insert the rule. Correct ?  Do i go this way:  Submit Options Dialog Box --> Allow users to submit this form (check it) "Perform custom action using Rules" (click on Rules button).  On "Rules for Submitting Forms" Dialog Box click the Add button --> On "Rule" Dialog Box .....where do i go from here ??  I see a "Set Condition" and "Add Action" Button

    I APPRECIATE YOUR HELP ON THIS....................   

     

  • 03-07-2008 08:24 AM In reply to

    I think you are missing the submit data connection which is where you specify the location for the XML to be saved. Then you select this data connection for your submit action.

     

    Tools -> Data Connections Go through the wizard.

  • 03-07-2008 08:46 AM In reply to

    If I add a field to the form where would I place it on the form (hiden from view so users would not see it)  ?  Also wold I have to add a Data source to this field ?

    Can you clarify when submitting the form using the same field how would I be able to accomplish this ? Perhaps this is similar to another blog I posted concerning "Submit Control Button".  

  • 03-10-2008 09:32 AM In reply to

    I also see a Tools --> Submit Options  as well.  Do I need to configure this as well ??

  • 03-10-2008 10:25 AM In reply to

    Hey Walter.

    You can add a field to your data source but not to a view.  This field would be then "hidden" from the user's perspective.

    The submit options is a way to handle form submits globally but not necessary if you use submit actions.

    Probably from a perspective of getting started, once you have your data connections created you can use it with custom rules and look at the advanced options etc.

  • 07-31-2008 11:02 AM In reply to

    Hi Clay,

    I am very interested in the technique you are describing. Could you please elaborate on it? I have been struggling for a week to find a solution to this. I want the submit options to "autogenerate" a name. This I know how to do, I am basically just using the now() function. However, If the user goes back and edits the form, and hits the submit button I don't want it to create a new file, but just overwrite the current file. Is there a way to do this type of logic in the "Insert Formula" section of the file naming? I believe that is what you were talking about when you say store the name in a field on the form, but can you please just walk through this procedure? I would really appreciate it.

     Thanks!

  • 07-31-2008 03:20 PM In reply to

    Create a field in your main datasource called filename

    Add a open rule (Tools, form options, Open, rules)

    Add a condition if filename is blank.

    Set filename to now()

    Then in your submit for the filename just reference the field.

  • 07-31-2008 09:58 PM In reply to

    It worked, Thank you so much!
Page 1 of 1 (12 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.