quote:
Originally posted by Patrick Halstead
Hi Sainzmichael,
You could use an OnAfterChange event handler to call SQL directly and update the current price field when the model number changes. Can you provide the code you are using that isn't working (or the rule) and some description of the schema?
Thanks
Patrick Halstead [InfoPath MVP]
InfoPathDev
Thanks Pat for the reply.
I have a table called OrderDetails for each line item. It is the child of a table called Orders which is all in SQL and is the Main Data Connection. In OrderDetails there is an atribute field called UnitPrice. In my form there is a drop down box that gets its list from a secondary data source called Products, also a table in SQL. Products has all the prices and model numbers (the way we reference and locate product) in it. The drop down list gets its list from the secondary source, but stores the data in OrderDetails in a atribute called ProductID.
From what I have said above in previous posts, I am trying to get it so that when the product is selected from the drop down list, it will populate a textbox with the correct price. I would like to try to do this with rules, but if not, code will have to do...i'm just learning scripting so if you point me in the right direction, I'm sure I could figure it out ;)
Thanks for the help Pat!
(Your book is AwEsOmE!)