Refresh form contents based on data source change - InfoPath Dev
in

InfoPath Dev

Refresh form contents based on data source change

Last post 11-08-2005 10:44 PM by franck. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-01-2005 03:33 PM

    Refresh form contents based on data source change

    Hello,

    I have a form that has a drop-down list box attached to an SQL server secondary data source that contains customer names and addresses. When a user chooses the customer name from the drop-down list, the address, zip, etc fields auto-fills using the rules method. However, if the customer's address changes in the data source and we re-open the form, the address and other info still displays the old data. The only way to get it to update in the form is to change the drop down list to a different customer, and then change it back. I tried adding a "Refresh" button that is set to refresh all data sources, but it doesn't seem to refresh the data. Can anybody suggest a method for either getting this "refresh" button to work as I think it should, or to set the form to refresh the data each time it is opened?

    Thanks,

    Jason
  • 11-01-2005 06:22 PM In reply to

    Re: Refresh form contents based on data source change

    Hi,

    The address is stored in your primary DOM, right? So, even if the secondary data source did change, the changes won't automatically flow to your main DOM. You need to open your secondary DOM by code and compare data for a given Customer ID. You can do this OnLoad and/or with a Refresh button. It will involve some coding, but it is doable.

    Regards,

    Franck Dauché
  • 11-01-2005 07:10 PM In reply to

    Re: Refresh form contents based on data source change

    Hi,

    Thanks for the quick reply. What you describe is exactly how my form is setup. Unfortunately, I am at best a novice programmer so really have no idea how I would code this. Could you point me to any MSDN articles that would deal with a scenario like this, or any code snippets I may adopt for this purpose?

    Much Appreciated,

    Jason
  • 11-08-2005 10:44 PM In reply to

    Re: Refresh form contents based on data source change

    sorry, I missed your answer there....
    You can do a search for "Secondary DOM" in this forum to get some samples.

    Franck
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.