I've seen several iterations of this issue here, but can't seem to get any satisfaction in my form :).
I am trying to set the value of a drop down. I can get it to work...sort of.
At the top of my form, I have a NetworkID section that allows users to plug in their NetworkID. When they click a button, I use jscript in the OnClick event to perform a query on a secondary data source. If values are found corresponding to the network id, they are used to populate several text fields in the form below. Now, this is pretty straightforward - I set the default values of the text fields to the secondary data source.
However, of course, drop downs don't have default values. So, when the button is clicked, the query is fired, and the fields update but the drop down doesn't. So, I set up a rule on the button that sets the value of the drop down equal to the corresponding value of the secondary data source.
If I click the button twice, the drop down is reset as expected to the matching value. I'm guessing this is an order-of-operation thing. In other words, the rule is fired, then the OnClick event occurs. Is there any way to run the query first (oh and I need to pass parameters to the query, so making a rule to run the query won't work because you can't paramaterize within a rule)?