Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Relink Multiple InfoPath Forms in SharePoint

  Asked By: Tessa    Date: Apr 05    Category: Sharepoint    Views: 3230

I need to know how to Relink Multiple InfoPath Forms in SharePoint. I tried the
code below to add a Check All button but it does not work. Do you know of anyone
that could help?

<script type="text/javascript" language="javascript">

function CheckAll(chkDocumentCollection)
{
var chkDocumentCollection = document.all.chkRepair;
for (i=0; i<chkDocumentCollection.length; i++)
chkDocumentCollection[i].checked = true;
}
</script>
<input type=button value=CheckAll
onclick=CheckAll(document.aspnetForm.chkRepair)>

Below is the code on the Re-Link aspx page that re-links one Infopath Form for
at a time.

function repairLinks()
{
if ((browseris.w3c) && (!browseris.ie))
document.all = document.getElementsByTagName("*");
var cntChecked = 0;
var inputSubmitRepairDocs = document.all.SubmitRepairDocs;
inputSubmitRepairDocs.value = "";
try
{
var chkDocumentCollection = document.all.chkRepair;
for (i=0; i<chkDocumentCollection.length; i++)

if (chkDocumentCollection[i].checked)
{
inputSubmitRepairDocs.value += chkDocumentCollection[i].docID;
inputSubmitRepairDocs.value += " ";
cntChecked++;
}
}
catch(ex)
{
}
try
{
if (document.all.chkRepair.checked)
{
inputSubmitRepairDocs.value = document.all.chkRepair.docID;
cntChecked++;
}
}
catch(ex)
{
}
if (cntChecked > 0 && cntChecked <= 100)
{

document.all.SubmitRepairRedirectList.value=]]></HTML><ScriptQuote&g\
t;<List/></ScriptQuote><HTML><![CDATA[;

document.all.SubmitRepairRedirectFolder.value=]]></HTML><ScriptQuote\
><GetVar
Name="RootFolder"/></ScriptQuote><HTML><![CDATA[;

document.all.SubmitRepairDocsForm.action=]]></HTML><ScriptQuote>&\
lt;HttpVDir/></ScriptQuote><HTML><![CDATA[ +
"/_layouts/submitrepair.aspx";
document.all.SubmitRepairDocsForm.submit();
}
else
alert(cntChecked == 0 ? L_RepairSelectionEmptyError_Text :
L_RepairSelectionTooLargeError_Text);
}

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Adrian Chen     Answered On: May 31

Hi Tessa, we have recently released a tool which relinks thousands of Infopath forms very quickly instead of painfully clicking all the relink checkboxes in Sharepoint. See http://www.codistri.com/relink-infopath-forms

 
Didn't find what you were looking for? Find more on Relink Multiple InfoPath Forms in SharePoint Or get search suggestion and latest updates.




Tagged: