Just as I begin to warm up to data connections, I get confused once again :(
When I started playing around with Infopath for the first time, I did so by creating a form to query an Access database. The database was my main connection and it showed query fields and data fields. So I created some combo boxes bound to these query fields and the data that the user was able to pick in each one was populated through secondary data connections (filtering based on the previous combo box value). Then I simply added a repeating section bound to the main data source (to the data fields) and when the Query button was clicked, this section populated with the results. The Query button was part of the template, but when I checked its properties, the Action was set to "Run Query".
In my "second phase" I decided to now place the database on Sharepoint. I actually rebuilt a new database with better structured tables and moved it to a Sharepoint site. The tables were made into lists and these were linked into a database that was placed also on the Sharepoint site. So now we have the flexibility of creating custom forms, reports and queries in Access, while still being able to edit the lists in Sharepoint. When I started a new form design, I found that the Access template cannot be used as the database does not contain any tables (only links to the lists). So I decided to start designing from a blank template.
I noticed that the main data source is bound to an XML schema and I no longer have "query fields" as in my first encounter. So the first thing I did was to create two Receive data connections (two related Sharepoint lists). Then I inserted a button control to submit the query, but that option does not exist. I tried several things which I knew deep down they wouldn't work (you know the feeling....but you try nonetheless!). I added a combo box and bound it to a field in the main data source (I'm almost sure this isn't right, but I have no idea what else to try since I don't have query fields available). Then I added a repeating section bound to the second secondary data source (doesn't refresh when form is opened as I want it to populate with the correct queried data once the button is pressed). But now I'm stuck what to do next, so the question is....how do you go about setting things up so that once the user selects something in the combo box and clicks a button, the repeating table populates with the queried/filtered information? I'm at a loss as this form template is different than the one I started fiddling with and there are no query fields available. Any direction would be greatly appreciated!
Thanks!