Display SharePoint List Item Values in InfoPath Form - InfoPath Dev
in

InfoPath Dev

Display SharePoint List Item Values in InfoPath Form

Last post 02-18-2016 02:30 AM by pavel novak. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 12-10-2010 10:39 AM

    Display SharePoint List Item Values in InfoPath Form

    I've struggled with this.  I thought I could just create a Secondary data connection and retreive additional column data when opening up the form in Browser mode but it only gets the values from the first item row in the SharePoint List.  I have additional columns in the list the get populated via a Workflow and I want to display these values when the user opens up the InfoPath form.  Could someone outline the steps to do this?

    Bismarck

  • 12-10-2010 11:28 AM In reply to

    Re: Display SharePoint List Item Values in InfoPath Form

    Hi --

    I'm trying to understand if you have multiple rows in your ShP list, but only one row is being returned, or if you have columns in your list that don't show in your data source in InfoPath.

    Is the field related to the rows in your data source showing as repeating? What type of secondary data connection are you using?

    Hilary Stoupa

  • 12-10-2010 01:01 PM In reply to

    Re: Display SharePoint List Item Values in InfoPath Form

    Thanks for looking at this,

    I have a secondary data connection (let's call it "GetListData") that points back to the Form library where I'm storing these InfoPath forms.  In the data connection I check off some "List-Centric" (not Site) columns that I added to the form Library (like "ApprovalDate", and "Manager").  When the InfoPath form is submitted, I have an SPD Approval workflow that populates these two columns in the Form Library.  What I was hoping to accomplish is when the user re-opens the Infopath form (Clicked the item in the Form Library to view), I want the form to retrieve these two values and display them on the form (Sometimes the users may need to print the "Approved" InfoPath form).

    But what is happening is that the values are only from the first row in the form Library.  So if I click on the 10th InfoPath form in the library, the ApprovalDate & Manager are from the 1st row in the library.  These fields are not repeating.  So I guess I have columns in my list that are not showing the correct values.

     

    Bismarck

  • 12-10-2010 01:16 PM In reply to

    Re: Display SharePoint List Item Values in InfoPath Form

    Okay. So the fields on your form that are displaying these values are always showing the first row. The reason is most likely because your secondary data source contains all the rows from your form library.

    Drag the data fields (all of them) from the secondary data source onto your form and preview the form. Do you see a lot of rows? Or just one?

    If you are just displaying the info, you should use an expression box or a calculated value (IP 2010) to show the data on your form. You'll need to have a filter on that data when you select the fields from your secondary data source, which means you'll need to be able to identify which form is currently open (compare fields in the secondary data source to fields in the main data source). When you select a field from a repeating data source, you'll see a Filter button you can uses to specify which row you want....

    Hilary Stoupa

  • 12-10-2010 01:38 PM In reply to

    Re: Display SharePoint List Item Values in InfoPath Form

    Ah ha...  I'm getting somewhere.  When I drag the secondary data source I see all 10 rows in the library with the columns (ID, checked_Out_to, Title, ApprovalDate, Manager) which is what I selected in the data source.  So now that I understand what is happening, I need to add a filter (Filter Data dialog box) when I pick the value (this is all in a rule in the form opening).  What fields do I compare?  The most logical one would seem "ID".  I have a "Main_Submit" and a "GetListItems" (secondary datasource). Do you have an example?

  • 12-10-2010 01:54 PM In reply to

    Re: Display SharePoint List Item Values in InfoPath Form

    The problem with ID is that it is the SharePoint List ID. That won't be in your main data source. You don't happen to be using SharePoint 2010, do you? It has a checkbox where you can select to just get the library data for your current form....

    You may have to filter on several of your form's promoted properties to get the correct row -- a lot depends on what you are promoting, what may be unique.... You may need to experiment with storing a value in your form when the form is submitted, like whatever fields you use to create the unique form name, you may be able to leverage that...

    Hilary Stoupa

  • 12-10-2010 02:02 PM In reply to

    Re: Display SharePoint List Item Values in InfoPath Form

    Well, I'm using SharePoint 2007 & InfoPath 2007.  What I have been doing however is submitting with a unique File Name so in a sense each forms file name will be different.  I think I could compare this. But Title should be unque as well.  I am storing this unique File Name so let me see if I can get this to work.

     Thanks fr your help

    Bismarck

  • 12-11-2010 09:20 AM In reply to

    Re: Display SharePoint List Item Values in InfoPath Form

    Create a form with repeating table and bind it directly with secondary data connection which in your case is Sharepoint list, you can select columns from the list for which u want to fetch the information, i hope this would get you what you want exactly. Let me know if you face some problem still...
    Vishal Srivastava
    Senior Software Engineer
    SDG Software Pvt Ltd
  • 02-18-2016 02:30 AM In reply to

    • pavel novak
    • Not Ranked
      Male
    • Joined on 02-17-2016
    • Praha, Czech rep.
    • Posts 1

    Re: Display SharePoint List Item Values in InfoPath Form

    hi all i have same issue. i have a document library, Approval Reqeust list (an approval workflow is running on this list). i would like to see some columns (values) from the request on the form in TASK list. i can modify this form in Infopath. i made a secondary connection but when i open one approval task , i can see my columns/values from all request (Approval Request list). can you help me to see only valid data for the one approval Task request, not the list of all? thx apavel
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.