Hi,
An easy way is to create a "reset" function in your code that you can call
after your current data is saved. In that function, you can target the node
linked to your drop-down, and you can set the value by code to be "" (if it
is your default value).
thisXDocument.DOM.selectSingleNode(node path).text = "";
This works OK if you are just trying to reset a few specific nodes.
Hope that helps.
Franck Dauché
> Question: How do I refresh my InfoPath form after hitting the Submit button
> that saves the data to a database.
[quoted text clipped - 6 lines]
> choose a new item ddl. This way it can refresh the data. How can I do this
> within the Submit button? Thanks in Advance.
NikV - 15 Sep 2005 20:01 GMT
Frank;
I'm pretty new at this InfoPath stuff so please walk me through to do a
reset. Can you show me the steps? Thanks!
> Hi,
>
[quoted text clipped - 20 lines]
> > choose a new item ddl. This way it can refresh the data. How can I do this
> > within the Submit button? Thanks in Advance.
Franck Dauché - 15 Sep 2005 20:27 GMT
I am assuming a IP project with C# code behind. You added a button to
perform your "Save" function. After that "Save call" just add:
resetMyControls();
At the bottom of your FormCode.cs, add:
private void resetMyControls()
{
thisXDocument.DOM.selectSingleNode(node path).text = "";
//where -node path- = "/my:rootName/my:......./my:finalNodeName"
//add here any other nodes that you need to reset
}
Franck Dauché
> Frank;
> I'm pretty new at this InfoPath stuff so please walk me through to do a
[quoted text clipped - 24 lines]
> > > choose a new item ddl. This way it can refresh the data. How can I do this
> > > within the Submit button? Thanks in Advance.