Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I created an InfoPath form which should be published as a site content type.

The content type will be used in several libraries. The form must create an unique filename for every new instance. Every tutorial for creating a unique name I found requires a data connection to the library where the form is in use. But since it is a content type which can be used in several libraries I can't add a static submit connection.

Is there a dynamic way to save the form in the lib where it has been instanciated with an unique name? (SharePoint 2010, InfoPath 2010)

share|improve this question

1 Answer 1

Depending on your true requirements there are multiple ways to do it. If I don't care about doing incremental naming I simply use a timestamp to create the custom name. I create the field named FileName and set a default value using the now() function, although I translated it. So it would be something like translate(now(), "Tt:;-_ ", "") this strips out everything and leaves numbers only, which you could also shorten if needed. So the only potential issue with this is if two people happen to initiate the form at the same exact time.

share|improve this answer
    
That would be a soulution. The requirement is that the user should not be prompted for a name. But what next after creating the filename field, do I need a submit connection? –  elsni Feb 25 '13 at 16:04
    
Well you would need a submit connection anyway to submit to SharePoint so that it can be published correctly, unless you are making the form more intelligent with code behind. So you would configure it in your submit connection. I haven't used an InfoPath form to submit to multiple libraries before so not sure how you would let the form be smart enough to know where it is submitting too in this scenario. –  Cory Feb 25 '13 at 17:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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