Display 2 columns in Dropdown - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Display 2 columns in Dropdown

Last post 07-11-2006 09:46 PM by clareabradley. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 03-23-2006 07:07 AM

    Display 2 columns in Dropdown

    I have a dropdown getting filled from a Sharepoint list. How I can I display 2 columns, the Code and it Description? I only need to save the Code value.
    Dean
    Charlotte, NC
  • 03-23-2006 01:11 PM In reply to

    Re: Display 2 columns in Dropdown

    Hi Dlgross,
    Need more details... what does Code and Description mean? Why not just use two dropdowns and bind the second the the Description data that is loaded into the secondary data source?
    Patrick Halstead
    Project Manager at Qdabra
  • 03-23-2006 02:46 PM In reply to

    Re: Display 2 columns in Dropdown

    My list in WSS contains 2 columns, Code and Description (a company cost code that is 4 digits and a text description). Some people like to see the numbers, some people like to see the words. I would like to have the drop down concatenate them together for display purposes only. I don't need 2 dropdowns since the code and its description are only one choice.
    Another idea would be to have the Code values displayed in the dropdown and have an adjacent text box display the Description for the selected value, how could I do this? I'm coming from MS Access where this type of stuff is easy, but this is my first form in IP and I'm muddling along.
    TIA
    Dean
    Dean
    Charlotte, NC
  • 03-23-2006 03:43 PM In reply to

    Re: Display 2 columns in Dropdown

    I can think of two ways to do this, and they are practically the same.

    1. Create a three column secondary data source that is populate from the SharePoint list. The first and second columns will be code and description. The third column will have a formula for the default value, which will be:

    concat( code, ": " , description);

    2. Do the same thing, in SharePoint, then you don't have to add a secondary data source to your form.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 03-24-2006 06:49 AM In reply to

    Re: Display 2 columns in Dropdown

    I'm a little bit confused about the 1st way you suggest (I know how to do the 2nd, and would like to learn how to the first, so I hope someone can clear this up for me). I already have a Main data source and a Secondary data source. The DropDown List control looks up the values from the SharePoint list with a value =@Cost_code and Display =@Cost_code. The Secondary data source shows 2 fields and the Add menu is greyed out. Where and how do I add the concatenation formula?

    TIA
    Dean
    Dean
    Charlotte, NC
  • 04-04-2006 04:43 AM In reply to

    Re: Display 2 columns in Dropdown

    Hello Dean,
    You would have to create a totally new secondary data source with three fields. Then write a bunch of code to copy over the data from the sharepoint list data connection to the new secondary data source. When you are copying it over set the third node value to be the concat value. But this would be lot more complicated than the second option.
    Shanthi Reddy
  • 07-11-2006 09:46 PM In reply to

    Re: Display 2 columns in Dropdown

    Hi, I am also trying to do this.
    I want to show two columns - unique number and name within the same drop down list.
    On my list in SharePoint I have created a column which has "number, name" but when I go to create a datasource in infopath to this list, the column which is a calculated column ("number, name") is not listed as one I can select.
    Can anyone help?
    Thanks
    Clare
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.