Populate a form's field with a SharePoint list field's text using "query using a data connection" rule - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Populate a form's field with a SharePoint list field's text using "query using a data connection" rule

Last post 03-08-2013 01:24 PM by AlexK. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 03-06-2013 11:10 AM

    • AlexK
    • Top 150 Contributor
    • Joined on 12-31-2012
    • Posts 61

    Populate a form's field with a SharePoint list field's text using "query using a data connection" rule

    I would like to show in a text box on my form the contents of a SharePoint field when the form is opened, kind of like a lookup. I found some brief documentation on this here but it does not tell me how to actually put the contents of the field onto the form for display. Assuming I am querying "field1" from my SP list, I set up my data connection fine and make a rule to "query" the data, but now I don't see any way to use the queried field1 to show on my form. What am I missing?
  • 03-06-2013 01:56 PM In reply to

    • AlexK
    • Top 150 Contributor
    • Joined on 12-31-2012
    • Posts 61

    Re: Populate a form's field with a SharePoint list field's text using "query using a data connection" rule

    I thought I had figured it out, but it's still not working. I tried creating a rule and found the option to "set a field's value" on "Form Load", so I set my form's field to be the queried data under the data source dropdown. When I open the form in the browser from the Sharepoint list, nothing shows up. It doesn't show even if I open with InfoPath either. It seems to be partially working because if I pre-populate my form field with any text, and load the form again, that text is not showing either, so the rule seems to be trying to load something into the form, just nothing is showing.
  • 03-07-2013 12:44 AM In reply to

    Re: Populate a form's field with a SharePoint list field's text using "query using a data connection" rule

    Hi AlexK,

    I had a similar problem.

    You have to do a Query Data Conection to that SP. Then you have to go to properties of the text box and Set Value of the colum in the SPlist. To Set the field you have to put a condition. What field of the list you want? If you don´t put any condition, Infopath automatically Set Value of the first item, and always the first.

     Do you understand Spanish? In Spanish I could explain better.

    Keep in contact. Regards

  • 03-08-2013 11:48 AM In reply to

    • AlexK
    • Top 150 Contributor
    • Joined on 12-31-2012
    • Posts 61

    Re: Populate a form's field with a SharePoint list field's text using "query using a data connection" rule

    Thanks. I already have the Query set up, and I am doing a rule with action to set the field's value. But, I am doing it on the Form Load control, not the text box itself. Does that make a difference? Sorry, I have limited Espanol skills :(
  • 03-08-2013 11:58 AM In reply to

    Re: Populate a form's field with a SharePoint list field's text using "query using a data connection" rule

     Hi -

    You have a secondary data connection to your SharePoint list? You can drag the field from the data source task pane onto the form. Or you could use a calculated value to display the value - am I not understanding the question?

    Hilary Stoupa
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-08-2013 12:38 PM In reply to

    • AlexK
    • Top 150 Contributor
    • Joined on 12-31-2012
    • Posts 61

    Re: Populate a form's field with a SharePoint list field's text using "query using a data connection" rule

    Ok, an update: I was able to get it working using Rules to set my form's field to the SP field, but it only works for if the SP text fields is NOT "Append Changes to Existing Text"-enabled. I did not think to just drag the data connection's field into the form, so I tried that with a text field that had "Append Changes to Existing Text" enabled but nothing shows. I think I have read that this should work with an "Append Changes to Existing Text" field as well, so there must be something I'm missing.
  • 03-08-2013 01:24 PM In reply to

    • AlexK
    • Top 150 Contributor
    • Joined on 12-31-2012
    • Posts 61

    Re: Populate a form's field with a SharePoint list field's text using "query using a data connection" rule

    Strangely, dragging the control for the Append changes text field shows no control at all when I actually open the form. Possibly because there is no text inside yet? I would think at least it would show a text area that is empty.
Page 1 of 1 (7 items)
Copyright © 2003-2014 Qdabra Software. All rights reserved.
View our Terms of Use.