Query fileds not "Anding"

J

jeff.riley

Hello all,

I have the following three fields in my query data section. The project
drop down (second field) changes based on the domain selection (first field),
and the component drop down (third field) changes based on the project
selection (second field), but when I select the run query button it is
returning me everything in the database. Why?

Thank you for your help,
Jeff Riley
 
S

Scott L. Heim [MSFT]

Hi Jeff,

This seems odd and I am not seeing the behavior you describe. Would you
mind completing these sample steps and let me know the results?

- Create a new InfoPath solution from the Microsoft Access (or SQL Server)
Northwind database
- Add the Customers table, then insure Customers is highlighted and add the
Orders table (related on CustomerID) and finally insure Orders is
highlighted and add the Order Details table (related on OrderID)
- Once the form is ready, drag the CustomerID field from the Customers
table in queryFields and the OrderID field from the Customers table in
queryFields to the query section of this form.
- From the dataFields, drag the Customers table to the data section and
choose Repeating Section with controls.
- Preview the form
- In the CustomerID field, enter: WOLZA and click Run Query - you should
get 6-7 orders returned
- Now enter 10792 (assuming this is one of the orders returned) in the
OrderID field and click the Run Query button again...did you get just the
one record returned?

Assuming this works as expected, what is different in this scenario versus
how your form is designed?

Thanks,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

jeff.riley

Scott,

I think I have found my problem. When I build the 'main connection' it
typically will have more than one table. It appears that only fields in the
parent table can be used for querying. The first and second fields in my
example come from the child table, so I am only able to use those to 'filter'
my third field. Is this your understanding of the way InfoPath queries work?
Also I have not been able to find how I can sign up for an instructor lead
InfoPath class, as I am really needing some face time with an expert.

Thank you very much,
Jeff Riley
BP
 
S

Scott L. Heim [MSFT]

Hi Jeff,

I am not sure I follow your question. Did you complete the steps I
suggested? The reason I ask is that the sample steps show how the main
connection will contain more than one table and I am using "query fields"
from both the "parent" table and one related table.

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top