Set value to Infopath using FormEvents_Loading event RRS feed

  • Question

  • Hi

    I have published InfoPath form templates to a Form Library. In the from library there are some columns. I want to write an event, once I load the form in the browser I want get a value from the column and set in to a control (textBox) in the InfoPath form. How to do this in FormEvents_Loading in Code editor.



    Thursday, October 27, 2011 8:44 AM


All replies

  • Have you considered using a rule instead?  That way you can avoid coding.

    You can have rules fire when the form loads.  i can't remember exactly how to get to the right dialog box, but it's through something like File -> Form Options.

    --Paul Galvin, BrightStarr
      Microsoft MVP - SharePoint
      Blogging @ http://www.mstechblogs.com/paul
      Twitter @ http://www.twitter.com/pagalvin
    Thursday, October 27, 2011 10:23 AM
  • Hi,

    Thanks for the reply.

    I want some thing like this.

    Each form there is a field caled  'fldNumber'. when I open the form, I want to get the Number from the column and put in to the field(thats in side the form).

    Please help me on this.

    Im trying with FormEvents_Loading in Infopath Code editor. I have no idea how to get the column value in side the FormEvents_Loading event.


    Friday, October 28, 2011 5:41 AM
  • Hi,

    Here is an article about how to achieve this with SharePoint Designer workflow.


    Pengyu Zhao

    • Marked as answer by Pengyu Zhao Friday, November 4, 2011 5:42 AM
    Friday, October 28, 2011 9:37 AM