Any way to add a InfoPath form as a template in a custom site template

B

Brian Madden

Hi all,
I have a big problem I'm trying to solve right now. I have a custom site
template that requires a forms library with an InfoPath form as a template.
Now, I have the site template adding the new forms library with the InfoPath
form working on my development server and it works pretty well. My block
is in moving the site template to QA, which is a different server. The publishURL
on the InfoPath form points to the dev server and the form will not display
at all. Is there any way to modify the InfoPath form to work in QA? I need
to have the form work on multiple sites, so I would need to do this programmatically
I'm guessing.
Has anybody done this before???

Thanks!
Brian
 
A

Adam Harding

Brian

If i am understanding this correctly all you need to do is re-publish the
form to the QA Site virtually by placing it phyiscally on the OTHER server eg

DATRSAFDWCL002\DEV\Infopath
DATRSAFDCWL003\QA\Infopath

To make it extra clever you can publish the form onto the QA server but use
the DEV server path to specify the DEV server, but that is really just
complicating things.

Cheers Adam
 
R

Rob Robinson

Brian -

You publish the Xsn file to the new server, then copy all the xml files to
the new server, and the problem is that all the Xml files still point to the
Xsn on the old server, right? You need to do a bulk replace of the Xml files,
altering the Xsn file location. I've been doing this with a freeware utility
called "_Replace.exe" (http://llbest.com/_REPLACE.htm), in a CMD file. This
is also handy for pointing the Xml files to a new version of an Xsn, with a
different file name. The command file is shown below. By the way, I believe
the InfoPath installation also includes a similar batch utility for doing
mass updates of xml files.

@ECHO OFF
REM Does a "multiple file global search and replace". (Does a search and
replace
REM operation on all of the .TXT files in a particular folder.)
REM
REM _REPLACE "search string" ["replacement string"]
REM [/I] [/S] [/T] [/MIN=n] [/MAX=n] [/EXT=s]
REM
REM /I Ignore case.
REM /S Include subdirectories.
REM /T Test mode (Do not make any actual changes to any files).
REM /MIN=n Minimum allowable replacements per file (Default = 0).
REM /MAX=n Maximum allowable replacements per file (Default = 99999).
REM /EXT=s Perform operations only on files with extension s (Default =
..txt).
REM
REM If "replacement string" is omitted, a null replacement string is used.
REM
REM 6 types of search/replacement string characters have special
representations:
REM
REM Backslash (\) - "\b" or "\B"
REM New line - "\n" or "\N"
REM Percent sign (%) - "\p" or "\P"
REM Quote sign (") - "\q" or "\Q"
REM Tab - "\t" or "\T"
REM Decimal code - "\ddd" where ddd is a 3 digit number between 001 &
255.
REM
ECHO Global search and replace for InfoPath XSN version.
ECHO ----------------------------------------------------
ECHO Be sure you have modified this script to reference the old and new
ECHO template files referenced by the .xml documents. If you have not, then
ECHO press Ctrl-C and cancel this script. Otherwise,
PAUSE

_replace "\b\bDevServer\bTemplates\bYourTemplate.xsn"
"\b\bQAServer\bTemplates\bYourTemplate.xsn" /i /s /EXT=.xml

ECHO Replacement complete.
PAUSE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top