Passing Querystring to InfoPath Filler Form - InfoPath Dev
in

InfoPath Dev

Passing Querystring to InfoPath Filler Form

Last post 10-21-2011 04:24 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-21-2011 04:09 PM

    Passing Querystring to InfoPath Filler Form

    This is NOT relating to a browser enabled form.  I don't have any problem passing the querystring when browser enabled.  I have the requirement to pass a record ID (listitemID) to a filler form via a link on a SharePoint page.  The form has been published to the site as a content type using the XSN as the content type template.  It is attached to a SharePoint form library as the only content type.  If I select the default 'New Document' control from the library it opens a new form just fine.  However, using the URL....

    <a href="/sites/Group/_layouts/FormServer.aspx?XsnLocation=http://sharepoint2010/sites/Group/TestForm.xsn&amp;SaveLocation=http%3A%2F%2Fsharepoint2010%2Fsites%2FGroup%2TestLib&amp;ClientInstalled=true&amp;Source=http%3A%2F%2Fsharepoint2010%2Fsites%2FGroup%2FTestLib%2FForms%2FAllItems%2Easpx&amp;DefaultItemOpen=1&amp;InstanceID=(Need to add parameter here)">Add document</a>

    The form opens but  when i pass a known InstanceID I only get the data populated for the 1st record in the sharepoint list.  This form can not be converted to a browser enabled form becuase there are some print/save requirements that browser forms can't accomodate. I know that the form event load code works fine as it will work if done as a browser enabled form.

     

  • 10-21-2011 04:24 PM In reply to

    Re: Passing Querystring to InfoPath Filler Form

    Do you have a try/catch in your on load so you can check for errors and show a message box with the error? That may help you.

    I've seen this case issue before - even though I was passing in and checking for a param with proper case, IP was getting one with all lower case - and no, it wouldn't surprise me if browser and filler behaved differently here.

    You can debug with input params - open the project explorer (in VSTA, not sure where you are writing your code or what version of IP you are using) and right click the project, select Properties. There is a place under the Debug category where you can enter command line arguments - it has been a while since I've done it, but the command line params ref is here.

    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.