Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / September 2005

Tip: Looking for answers? Try searching our database.

Refresh after submit

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NikV - 15 Sep 2005 17:06 GMT
Question:  How do I refresh my InfoPath form after hitting the Submit button
that saves the data to a database.

I have a drop down list that controls the flow of all the data in my form.  
If a user picks something from the drop down list it will populate the other
text boxes with data from an XML File.

What I want to do is clear the drop down list so that it forces the user to
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 19:50 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.