Compare two lists from data connection - InfoPath Dev
in

InfoPath Dev

Compare two lists from data connection

Last post 04-09-2018 06:06 AM by Guillaume. 25 replies.
Page 1 of 2 (26 items) 1 2 Next >
Sort Posts: Previous Next
  • 03-23-2018 09:42 AM

    Compare two lists from data connection

    Hi all, I have 2 Sharepoint lists connected to my infopath Form (secondary data connection). I would like compar both lists et display the result in the dropdown menu. exemple: Data connection list1: item1, item2, item3, item4, item5, item6 Data connection list2: item2, item3, item6 Display the result in the dropdown menu: item1, item4, item5
  • 03-27-2018 08:06 AM In reply to

    Re: Compare two lists from data connection

    So - does list 1 have all the items you need? If so, something like the attached sample should work (save the file locally, right click & select design to open in design mode, preview to try out). Basically, I used the Filter Data button when selecting the items, changed the filter of field2 = field3 to an expression and used the not() operator to display only the items that were NOT in the second repeating group. If you actually need to merge data from the two list, unfortunately, you would need to use code.
    Hilary Stoupa

  • 03-27-2018 08:38 AM In reply to

    Re: Compare two lists from data connection

    Thank you for your help, that's exactly what I want to do!!! When I open your file, I can add "Extensible table" in "containers", but in my infopath, I have not it.. How do you add/active "Extensible table" ? Thank you in advance for your answer.
  • 03-27-2018 08:41 AM In reply to

    Re: Compare two lists from data connection

    Oh - I used repeating tables so you'd have a sample that didn't have a data connection. You can do the exact same type of thing with your two SharePoint lists. If you need help setting up the filter for your dropdown, feel free to attach a copy of your form under the Options tab in a reply. Sounds like you are probably using a SharePoint List form if repeating tables aren't available in your controls.
    Hilary Stoupa

  • 03-27-2018 08:48 AM In reply to

    Re: Compare two lists from data connection

    In effect, I am using a SharePoint List form. So I can't use "Extensible table" ?
  • 03-27-2018 10:00 AM In reply to

    Re: Compare two lists from data connection

    You will have repeating data in your data connections to the two lists. That gives you repeating data, just like in my example. I used repeating tables in the sample so the sample form wouldn't need any data connections. If your question has to do with controls allowed in List forms - no, you can't add main data source repeating tables unless when you create the form, you select manage multiple items.
    Hilary Stoupa

  • 03-28-2018 01:28 AM In reply to

    Re: Compare two lists from data connection

    Ok thank you. But can I compare 2 data list connection ? (like an extensible list?). If yes, can you help me to write the filter expression ?
  • 03-28-2018 09:21 AM In reply to

    Re: Compare two lists from data connection

    Yes. Please attach your file under the Options tab in a reply & I can help you.
    Hilary Stoupa

  • 03-28-2018 09:50 AM In reply to

    Re: Compare two lists from data connection

    Thank you for your help. I add in attachment my InfoPath form. What language did you use to code the filter expression ?
  • 03-28-2018 09:55 AM In reply to

    Re: Compare two lists from data connection

    InfoPath uses XPath, because it is XML based. Which of the two lists has all the items? Stock? So you only want to see things in your dropdown from Stock that are not in Reserved Material?
    Hilary Stoupa

  • 03-28-2018 02:47 PM In reply to

    Re: Compare two lists from data connection

    Oh, one more question. Is Tracmor number in "Reserved Material" a lookup?
    Hilary Stoupa

  • 03-29-2018 01:18 AM In reply to

    Re: Compare two lists from data connection

    Sorry for my lack of explanation. Tracmor is an item identification code. The "stock" list contain all "N°Tracmor" and the "Reserved material" list contain only the "Tracmor number" which are booked. I would like in (champ13 (in french) or field13 (in english)) the "N°Tracmor" from "stock" list less "Tracmor number" from"Reserved material" list. (field13=stock(N°Tracmor) - Reserved material(Tracmor number)). Thank you in advance for your help
  • 03-29-2018 07:35 AM In reply to

    Re: Compare two lists from data connection

    I'm going to guess that Tracmor in the Reserved material list is a lookup, and that the Reserved material list data would actually be storing the item ID. I've modified your expression on the dropdown for that scenario. If you can give me additional info on the Tracmor column in the Reserved material list (like a screenshot of the column settings from the list settings in SharePoint) that would be helpful.
    Hilary Stoupa

  • 03-29-2018 09:15 AM In reply to

    Re: Compare two lists from data connection

    You think there is compatibility variable issue ?
  • 03-29-2018 11:05 AM In reply to

    Re: Compare two lists from data connection

    Can you send the screenshot from the Reserved Materials instead? Is that column a lookup type in Reserved Materials?
    Hilary Stoupa

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