Salvete! I have a custom infopath-built form. I also have 100 subsites - children of a single site collection. I plan to deploy my forms library via powershell to each site, and then, since I used a content type, if I want to edit the questions, the changes will go out to all 100 sites.

Now, I don't want users to have to tell where to save the form. When the user clicks the save button, I want Sharepoint to save the form in a library named "Reports" on whatever site they happen to be. The url is standard: http://myportal.mydomain.com/subsite1/reports or http://myportal.mydomain.com/subsite2/reports http://myportal.mydomain.com/subsite3/reports

You get the idea. Now, how do I tell it to submit the form and save it to that dynamic location? I only want to configure the infopath content-type template.

I found this, but the poor fellow never got any answers.

2 Answers 2


Since the idea is to generate a url that you want to use as the destination of your submit action, take a look at this post which has some code to do the job that you can attach to a button you have placed on the form using infopath. In your submit options, it has you place a "dummy url" that the code will replace with your dynamically built url.

I don't think you can do this without using custom code.

Look at this thread and this thread, too, about submitting to the form's own library for some details about getting custom code to work. There isn't much difference between using the form's own library than building a dynamic URL.


I believe the following step-by-step article should answer most of your doubts and questions:

  • I'm not sure you read my question; that page does not tell me anything at all about dynamic urls. Perhaps you could recommend some bit of a snippet of something I could use within InfoPath's "submit options > Perform custom action using code" feature.
    – bgmCoder
    Oct 16, 2012 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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