Need help linking fields to database and each other. - InfoPath Dev
in

InfoPath Dev

Need help linking fields to database and each other.

Last post 08-02-2012 10:51 AM by rokklimber75. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 08-01-2012 10:41 AM

    Need help linking fields to database and each other.

    Hi new to info path:   need to have fields reference my data base table.  first field is drop down list of business name.  need other fields to reference the drop down box and populate the other info about that business.... Cant figure out how to link these all together to make it work.

     Thanks in advance...

  • 08-01-2012 04:47 PM In reply to

    Re: Need help linking fields to database and each other.

    Hi - you will probably need to add filters to set these other values. Here is a little tutorial on that which might help you.

    Hilary Stoupa

  • 08-02-2012 08:09 AM In reply to

    That worked great!! but created new question

    I have another drop down on my form that pulls from a seperate table with Point of contact info in it.  I am trying to have my first box with the business name have a rule that gets the POC info to populate.  I am guessing that it is done similar to the the first question but with a query...   I am not sure how to link the certain business with the appropriate POC and have it populate.

  • 08-02-2012 08:21 AM In reply to

    Re: That worked great!! but created new question

    So, the separate table - is it a SQL table?

    Are you trying to return only the records that match your first selection? Or to filter the available values based on your first selection?

    If the data is from SQL, there is no built in way in InfoPath to return just the records you want based on a field value, unless the form is based off the data table, so you'd need to add a filter to the repeating selection in the drop down control.

    Hilary Stoupa

  • 08-02-2012 08:47 AM In reply to

    Re: That worked great!! but created new question

    The seperate table is in a database, the same one that has the business information table.  I have them linked in the database but cant figure out how to get that same type of link in the infopath form.  I would like to select the business name and have it pre-populate all of the other peices of information.  these peices of info are split between 3 or 4 different tables in the database

  • 08-02-2012 08:59 AM In reply to

    Re: That worked great!! but created new question

    Well, again, it will come down to using XPath filters.

    Let's say you have two tables:

    Table A (Company):
    CompanyID
    CompanyName
    Address
    City
    Etc

    Table B (Contact):
    ContactID
    CompanyID
    FirstName
    LastName
    Etc

    In your form, you have a drop down that is bound to your main data source field of Company. The drop down uses Table A for the values - the display is CompanyName, the value is CompanyID.

    You can have rules on that main data source field, Company. It will have the selected CompanyID in it. You can then set other fields based on that, using XPath filters (basically telling InfoPath, for example, select the Address from Table A where the CompanyID field is equal to the main data source Company field).

    You could also have a drop down that allows the user to select the correct Contact. That drop down could be filtered based on the selected CompanyID - that is, the rows from Table B that would be displayed would be those where the Table B CompanyID is equal to the Company field in your main data source.

    Sorry if this is sort of vague, but without actually seeing your form & data structures, I'm sort of guessing at what you might be asking. :-)

     

    Hilary Stoupa

  • 08-02-2012 10:51 AM In reply to

    That works I think my issue was that I didnt have a matching item on each of the tables for it to know how to reference.

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