none
Getting Infopath Form Library controls to populate with output of SharePoint List Query

    Question

  • I have an Infopath Form Library form which needs to query a SP List to retrieve basic info about an item stored on the SP List.  I've created a rule upon a button click to set the query variable with the value of the first text box and "query using a data connection" back to the list.

    I have a few other text boxes under the "local" myFields within the Form Library.  I dragged these over to create text boxes in the form.  In my rule setup, I've configured the "main" variables to update with the query data results, but when the query is performed, the text boxes in the form are not updated.

    Now I know that the query is working because I tested it by going back to InfoPath and dragging the myFields::dataFields elements into the form to create text boxes that are explicit references to the query data results-- those text boxes will successfully update with the correct data upon clicking my lookup button.  Unfortunately I want to have local instances of the variables I'm looking up, so this method won't work except as a spot check.

    I'm wondering if there's something wrong with my control definition, or if I need to issue a form refresh or something.

    TIA


    Saturday, July 20, 2013 3:24 PM

Answers

  • Hi Mike,

    Does the query work when you click the button on the InfoPath view application on your local machine?

    I have run into similar situations where the logic makes sense, the forms work when I run them on my local machines but for some reason won't work on the web-based InfoPath forms. Most of the times, the data connections had to be re-built and then the InfoPath form published.

    We need to identify the root cause of this issue.

    I look forward to your update.

    Thanks


    Daniel Christian (MCTS)

    • Marked as answer by MikeChan99 Tuesday, July 23, 2013 2:09 PM
    Sunday, July 21, 2013 10:41 PM

All replies

  • Hi Mike,

    Does the query work when you click the button on the InfoPath view application on your local machine?

    I have run into similar situations where the logic makes sense, the forms work when I run them on my local machines but for some reason won't work on the web-based InfoPath forms. Most of the times, the data connections had to be re-built and then the InfoPath form published.

    We need to identify the root cause of this issue.

    I look forward to your update.

    Thanks


    Daniel Christian (MCTS)

    • Marked as answer by MikeChan99 Tuesday, July 23, 2013 2:09 PM
    Sunday, July 21, 2013 10:41 PM
  • Yes it does work when using the local preview.  

    Built a new data connection, and now it seems to work locally and on the network.  However, there are artifacts of the old data query in the form template which is throwing errors, so I'll need to rebuild.  It also launches Infopath instead of spawning forms from the browser.  So I'll need to study my form parameters closely when I start over again.

    Monday, July 22, 2013 2:34 PM