Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It depends a bit on your available tool set, skills and exact requirements.</p> <p>There are 2 main ways of pre populating data inside an InfoPath form.</p> <ol> <li><p>Export the relevant fields as part of the form's publishing process. The fields will then become columns on the Document / Forms library from where you can manipulate them either manually, via a Workflow or wherever your custom code is located.</p></li> <li><p>Directly manipulate the form using code similar to what was provided by Axel_c previously. The big question here is: what will trigger this code? An event receiver on the Document Library, a SharePoint Designer Workflow, a Visual Studio workflow etc?</p></li> </ol> <p>If you are trying to do this from a SharePoint Designer workflow then have a look at the <a href="http://www.muhimbi.com/blog/2009/12/embed-c-or-vb-code-directly-in.html" rel="nofollow noreferrer">Workflow Power Pack for SharePoint</a>. It allows C# and VB code to be embedded directly into the workflow without the need for complex Visual Studio development. An example of how to query InfoPath data from a workflow <a href="http://www.muhimbi.com/blog/2009/12/sharepoint-workflow-power-pack-user.html" rel="nofollow noreferrer">can be found here</a>. If you have some development skills you should be able to amend it to suit your needs.</p> <p>I also recommend the site <a href="http://www.infopathdev.com/" rel="nofollow noreferrer">www.infopathdev.com</a>, they have excellent and active forums. You will almost certainly find an answer to your question there.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload