Getting Contact Information into a drop down list - InfoPath Dev
in

InfoPath Dev

Getting Contact Information into a drop down list

Last post 03-06-2012 12:27 PM by ErnestoM. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-01-2012 03:06 PM

    Getting Contact Information into a drop down list

    Hello All I thought this would be VERY simple to do however I have not found anything on the web to explain how I can do this. Here is what I am trying to accomplish: I have a Dropdown box that gathers its information from another sharepoint list. This sharepoint list is contacts. When a contact is selected there is another dropdown box that needs to be populated with the phone numbers of the selected contact on the first list. It may be so simple that I am just missing it I don't know. Here is what the form looks like: [Date] [Entered By] [Person that called] (dropdown list 1) [Call Back Number] (dropdown list 2 - getting phone numbers from contact selected above) Thank you VERY much in advance for your help. ~Nick
  • 03-01-2012 03:22 PM In reply to

    Re: Getting Contact Information into a drop down list

    Hi:

    What you are looking for is called cascading drop downs.

    I'm assuming you have your first drop down set up correctly. It is bound to a field in your main data source, I'll guess - and for the purposes of discussion, I'll call that field Contact.

    So, your second drop down - for the values, you'll use the same SharePoint list as you are using for the drop down bound to the Contact field on your form. When you select the repeating row for the data source, you can click the Filter button in the field picker. Your filter may vary depending on what the value field is for your first drop down, but basically, you want to make sure that you select the field your secondary data connection that is equal to the contact field in your main data connection.

    Yuck - I'm doing a poor job of explaining. See the attached sample (save it locally, open in design mode to preview). Note that if you creating an IP 2007 Browser form this type of filter is not supported on list boxes.

    Hilary Stoupa

  • 03-01-2012 04:44 PM In reply to

    Re: Getting Contact Information into a drop down list

    THANK YOU SO MUCH FOR YOUR REPLY!

    I wasn't able to open the attachment (gave me a permission issue) however I do believe I understand what you mean. Here is what I did:

    I left the first drop down as it was. It does a query against the list Contacts and returns all the contacts and just shows the display name in the drop down.

    I took the second drop down and had it query the same list however filter it based on the ID of the first dropdown.
    Here are my questions. 1) how do I select which fields it puts in the drop down. IE Business Phone, Mobile Phone, Home Phone in the list but not Home Address, Fax Number etc? Do I just only select those items in the Data Connection Wizard? 2) It actually isn't populating the drop down, do I need to have a rule or a script to have it activate the query on the second drop down once the first drop down selection is made?

    Thank you again for your response. This has been plaguing me for a while now... -Nick
  • 03-01-2012 05:01 PM In reply to

    Re: Getting Contact Information into a drop down list

    To open the xsn you have to open in design mode. So download it to your machine, then right click on the xsn file and select Design. That opens it in designer.

    So, I'm guessing you are using IP 2010 and ShP 2010? Are you getting the correct data returned in your new data source? You can just drag it onto your form and preview and see what you get when your Contact changes - it is easy enough to delete after you have things working.

    You need the rule to query the data source, which I'm guessing you've already done. Then in the properties for the control, you can select that data source for the items for the list. There are 3 field pickers under the data connection selection drop down - first one you can use to pick the repeating row. Then you can select any of the fields you like for your display and your value.

    Hilary Stoupa

  • 03-06-2012 08:27 AM In reply to

    Re: Getting Contact Information into a drop down list

    Hilary, I believe I may have found the source of my problems. I don't have the option to insert or create any repeating groups at all. This may be why so many forums that I looked in sounded like Greek to me.

    From doing a little more reading it may have something to do with the type of form it is.
  • 03-06-2012 12:27 PM In reply to

    Re: Getting Contact Information into a drop down list

    Hi Nick,

    Yes, form type matters in InfoPath. If you have a browser form or a client form: you get different options in the designer. If you have a SharePoint List form, or a SQL-bound form, you get different options. And so on. Here's a screenshot showing some of the form types.


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


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