0

I have a form library with a form template. When I save the form I would like each form to save in the following format -

Name City Date To - Date From

  • Eg. Joe Blogss London 02/12 - 04/12

The form submits when the user presses a button, the default Data connection has been set up with the following file name

concat(../my:TravellerDetails/my:FullName, " ", ../my:TravelInformation/my:City, " ", substring(translate(../my:TravelInformation/my:TravelStartDate, "/-:T", ""), 7, 2), "/", substring(translate(../my:TravelInformation/my:TravelStartDate, "/-:T", ""), 5, 2), " ", "-", " ", substring(translate(../my:TravelInformation/my:TravelEndDate, "/-:T", ""), 7, 2), "/", substring(translate(../my:TravelInformation/my:TravelEndDate, "/-:T", ""), 5, 2))

This works as expected but for some reason the name field shows the forward slash as an underscore, I cannot figure out where this underscore is coming from, is there something I am missing???

I created a filename field and placed the same formula in the default value and it shows up fine in the form library
enter image description here

This is my submit settings

enter image description here

If you are wondering why I don't just use this field 'File Name' I need users to be able to click on the form and open it, this can only be done on the 'Name' field

1

The forward slash is an illegal character in file names and is replaced with the underscore. I would use a dash instead and that should work for you.

  • Thanks for the quick response, I was racking my brain for too long on this! – Jamie_lee Dec 2 '15 at 15:37
1

There are certain characters that are reserved by SharePoint and this is by design. Your concat function works great, so i can only guess that infopath got some function that replaces any reserved characters to avoid errors.

Below Microsoft states that you cannot use a slash in a file name. And any other characters.

Information about the characters that you cannot use in site names, folder names, and file names in SharePoint

  • Thank you for the help, I appriacate it and the link was helpful – Jamie_lee Dec 2 '15 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.