Hi Julie,
I sent this to someone else after they contacted me from this thread. I emailed them with some images as examples, let me know if this helps you and if you're still unsure then I'll try to help more:
I also have a little test site to show people that updates choice fields based on users answers to a previous choice list. My example shows this:
Choice 1: Fruit or Vegatable (Choices “Fruit” or “Vegetable”)
Choice 2: Select Item (If the user chooses Fruit only fruit will show in the choices. If they select vegetable then they only see vegatables).
This example uses the same method as you would for bringing back data to populate a field in a form or such like. In InfoPath when you’re making the rules you need to think about when you Query using a data connection, I like to think that setting a Query field value is like entering a keyword on google before you press search. Imagine, the reason your system is taking a long time to do what you’re doing now because you’re searching for ALL and then filtering through the results for what you want.
If you switch to using Query fields it is like searching only for what you want and then only getting one (or fewer results). This is therefore extremely quick in comparison. In your rules set it up like this (I’m going to imagine your list a little bit so forgive me if it’s a bit out but I hope you get what I am saying)
Set a rule to say when a field is not blank, Rule type = Action:
1. Set a fields value. Now this one needs to be the Query field of your data connection, so for example if you had a column named “Court Name” and in your data table you had “Court Name” and “Court Address”, you would want to set the Query field value of the Secondary data source (your external data connected list) to equal the value the user selected in your form for “Court Name”. This is a little bit like putting on an autofilter! Therefore reducing the results of your upcoming Query using a data connection.
2. Next, you can now Query using a Data Connection. Because you’ve applied this Query field your data connection will only bring back one address now!
3. Finally you just have to set a fields value. This time you would set the value of the field on your form to the value of the data field in your secondary table (the one you just ran the data connection for).
This is done. It all sounds MUCH harder than it is. It’s only hard until you manage to pull it off once, then you totally get it! I’ll show you mine doing the same as you would above:
Step 1:(In my example because I’m using a LOOKUP type field as a choice field I have to link to the ID of the data connection as the system remembers the users choice in the form of the ID of the record from the external table – It’s a bit annoying and why it took me a while to work out – but if you don’t use that type and instead use a normal choice field and populate it will a data connection instead – it’s easier and instead of ID in my example I would be setting the Query field “Party Name” to the value of the field “Party Name” in my form.
Step 2: Query!
Step 3: Set values! The easy bit! So I’m now setting my field in my form to the value of the “Data Field” in my secondary data source.
Let me know how you get on and if you didn’t get any of it. I’ll help you until you get it. Trust me when I say it’s very easy once you’ve got your head around it. Let me know how you get on.
Ask not what your company SharePoint can do for you, but what you can do for your company SharePoint...