So - the basics are:
- When you create your secondary data connections (SharePoint list or library, InfoPath 2010 or greater), set them to not run on load - there is a checkbox in the final dialog that controls this.
- When your field changes, set the query field that corresponds with that number (I don't know what the number corresponds with in your secondary connections, but I'm assuming something, based on your description) in the secondary data connection
- Run the query for the secondary data connection
Then, the secondary data connection will ONLY have the data that matches on that field.
Now - in order for you to understand query fields better, here is what I suggest you do.
Drag the ENTIRE secondary data source onto the form - query and data fields.
In the query field section, add a button. On the button, set a rule to query the data source.
Preview the form, and try setting different query fields and clicking the button so you can see the returned data.
Make sense?