populate drop down on form load - InfoPath Dev
in

InfoPath Dev

populate drop down on form load

Last post 07-08-2005 06:27 AM by sharkmu25. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 07-07-2005 07:32 AM

    populate drop down on form load

    Hi, I'm new to infopath and my company and specifically my boss wants to start implementing infopath more and more as a forms tool to replace paper forms. I have been working with it to make basic forms, but I want to get more creative. I am trying to populate a dropdown list box with all the names in a column of a sql database before any buttons are clicked( so on load). I have not touched any scripting yet. I know vb, but haven't tryed vbscript. I also don't know exactly how the controls in the script editor correspond to controls on the form.. Please help! I have to get this project completed. Thanks
  • 07-07-2005 07:39 AM In reply to

    Re: populate drop down on form load

    Hi,

    You can do that without code are you interested by this possibilty?

    If yes launch infopath in the center window click design a form. in the taskpane click new from database a wizard appear link the database and specify default values for the query and design your form !

    If not in tools, programming, on Load event and write the code to link your database with our form!

    ++

    Thierry

    I'll hope this help!



    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 07-07-2005 07:49 AM In reply to

    Re: populate drop down on form load

    I know how to link the form to a sql database.. Its just before when i was attempting to pre populate the values in the drop down so that the user had to select a name.. Infopath was acting weird. The values wouldn't show up at first, but once I hit submit, the values were populated in the drop down.

    I want them to show up before anything else happens...
  • 07-07-2005 08:10 AM In reply to

    Re: populate drop down on form load

    Hi.

    Please excuse me if i have not fully understood your problem. You can create Secondary Data Sources. Within the InfoPath IDE select the Tools menu, Data Connections. Follow the wizard to create your SQL connection. Since you need this data as soon as the form is opened, make sure you have the Automatically retrieve data when form is opened option checked. Then back to the InfoPath IDE, Open the properties of your DropDown control and change the Data Bindings to your freshly created secondary data connection.

    Cheers. Scott.
  • 07-07-2005 11:13 AM In reply to

    Re: populate drop down on form load

    Well... Here is what I'm trying to do..

    I have a form to request changes..
    When filling out a new form... I'm trying to limit what the user can choose in the field submitted by. They should be able to select their name from a list. The drop down list needs to be filled with names from a SQL table when the form loads. I guess I will be using a 2nd datasource connection. But I'm having trouble making the names appear in the dropdown....
  • 07-07-2005 12:27 PM In reply to

    Re: populate drop down on form load

    Hi Sharkmu25 and welcome to our board!
    Can you provide any info on how you are setting up the data connection or what the error is? Thanks!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 07-07-2005 01:03 PM In reply to

    Re: populate drop down on form load

    Right now i am just using one data connection. It is a sql connection with one table.. each column corresponds to each of the controls which are either text boxes or drop downs.. I just need to know how to put those people's names into one of the drop downs by automatically querying one of the columns in this table or another..
  • 07-07-2005 11:20 PM In reply to

    Re: populate drop down on form load

    Hi again,
    Double click the field in your data source (under the query section) that will trigger the lookup and add a rule that queries the data connection.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 07-08-2005 06:27 AM In reply to

    Re: populate drop down on form load

    New problem :) Now it is populating the dropdown correctly, but when I make a selection the rest of the boxes populate... I just want to choose a name and leave the rest blank.. Any ideas?
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.