Adding a data source to an existing form does not show query fields only data fields - puzzled? - InfoPath Dev
in

InfoPath Dev

Adding a data source to an existing form does not show query fields only data fields - puzzled?

Last post 09-25-2007 11:16 PM by Clay Fox. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-25-2007 01:36 PM

    Adding a data source to an existing form does not show query fields only data fields - puzzled?

    I have inherited a form that someone in my organization created in InfoPath. There are several places where the user enters an account id and account name. I want to change that so that once they enter the account id, they can click a button and have a query run and get that name.
    I did it easily on a new form with the data source, with the query and data fields...However, when I tried to incorporate that into the existing form only the data fields display in the data source, not the query fields and data fields. When I run the query by clicking a button that runs the query, it is sitting on the first record.
    How can I get the query field onto the form?????
  • 09-25-2007 11:16 PM In reply to

    Re: Adding a data source to an existing form does not show query fields only data fields - puzzled?

    Hey Ed.

    The problem you are running into is that for InfoPath's default functionality in regards to a database form to be enabled it must be created as a database type form initially. 

    The limitations are any secondary data connection to a database directly can only receive data and has no way of querying the data. It is all loaded and you must filter for what you specifically need. This often causes problems because the tables can be very large and you may only need a row or two of data and the performance can really suffer.

    Otherwise if you create a database form template as a new template. You get one primary data connection which can query and submit, but only one table or group of related tables.  This is often an issue since you want to query a table other than your main data or you want to submit to several tables.

    The solution is to use webservices. Our Database Accelerator has web services which can both submit to and query multiple tables. Also in your case it includes an Active Directory service which you can use to identify each user automatically when the form loads. it can also look up others by their username.

    You should be able to do what you are attempting by creating a secondary data connection, which will load all of the data from your table. Then use a filter on the name field in your form that says it should be equal to the name field from your secondary DC filtered by accountID = your drop down or what was entered.

     

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