Pull Data from Second List Form - InfoPath Dev
in

InfoPath Dev

Pull Data from Second List Form

Last post 11-30-2016 10:35 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-25-2016 02:31 AM

    Pull Data from Second List Form

    Good morning,

    I have two SharePoint 2010 list forms.  I would like to pull some information from the second list form via a data connection if it matches certain data on the first list form.  Details are:

    List Form 1:  Various columns, but First Area,(dropdown linked to lookup)  Second Area (dropdown linked to lookup) & Third Area (multi-selection box linked to lookup)  

    List Form 2:  Three columns as above, but the fourth column is a Name (free text),

    I would like the first list form to populate with the Name/s if the three Area columns match, i.e. if there is a vacancy in the first three columns of the first list, and someone on the waiting list is looking in those areas, then that name/s to be pulled in.

     

    I hope this makes sense, and any guidance would be really helpful.

     

    Thanks 

  • 11-29-2016 02:31 PM In reply to

    Re: Pull Data from Second List Form

    In general, you should be able to use a data connection to the second list - I'd set the First Area, Second Area and Third Area query fields in the data connection prior to running the query, so you only get back applicable data. But I may not be understanding you, so if this answer doesn't make any sense, let me know. :)
    Hilary Stoupa

  • 11-30-2016 02:36 AM In reply to

    Re: Pull Data from Second List Form

     Hi Hilary,

     Thanks for the response. I have managed to get the data to pull through, but where there are several people on the waiting list (second list) where I try and match them up with available stock (first List) it will only pull through one name:

     For example:

    List One

    Items:  Plaster - Paving - Car - Motorbike

    List Two

    People - 3 waiting for a car

     2 waiting for paving

    So on List One against Car you would have the names of the 3 people waiting, and on Paving you would have the names of the two people waiting

     

    Do that make more sense?

     

    Thanks Claire 

  • 11-30-2016 08:05 AM In reply to

    Re: Pull Data from Second List Form

     Do you want the names aggregated? Like "Beth, Sam, Alex" or something? InfoPath doesn't have any rule actions that will add rows to a repeating table, and with list forms we can't add code - so if you need this data in the main data source, you'd have to use a double eval to aggregate it. If you just need to display the data, however, you could put the name field from your secondary data source on the form so the user can see the returned data....

    Hilary Stoupa

  • 11-30-2016 08:17 AM In reply to

    Re: Pull Data from Second List Form

     That's what I need, at the moment it's only pulling in one name.  The data isn't in a repeating table just a simple text column, do you have an example of the double eval?

  • 11-30-2016 10:35 AM In reply to

    Re: Pull Data from Second List Form

     I'm guessing your Name data from the secondary data source is going to be repeating, right? Maybe attach your form in a reply under the Options tab.... https://blogs.msdn.microsoft.com/infopath/2006/04/05/email-submit-to-line-loops-in-formulas/ has info on double eval formulas.

    Hilary Stoupa

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.