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 2007

Tip: Looking for answers? Try searching our database.

Error check when form opens (OnLoad event)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
emailmygroup@gmail.com - 25 Sep 2007 00:18 GMT
Hello all,

 I would like to check for errors in the form when it opens but the
problem is when I try to fill the form for the first time, it shows
the error message. What I would like to do is I dont want to show
error to the user for the first time but if the user has already saved
the form and opens second time, I would like to display error that you
havenot filled blah blah sections.

One solution I thought is getting the file name. If file name ends
with .xml it means that it is never saved. When user opens the form
for the first time, the file name might be something different. so I
can check it but I am not able to get file name. Is there any way I
can get file name? from XDocument.Solution.URI, I am getting form
template url but not the filled form file location

 Does any one of you have solution for this problem?

Thanks
K.Ramana Reddy(GGK Tech) - 25 Sep 2007 04:08 GMT
Hi,
we have thisXDocument.IsNew to check the form is new or already submitted.

var isNew = thisXDocument.IsNew;

If(isNew)
{
// Form is new
}
else
{
//Form is already submitted.
}

Signature

k.Ramana Reddy
http://www.GGKtech.com

> Hello all,
>
[quoted text clipped - 15 lines]
>
> Thanks
emailmygroup@gmail.com - 25 Sep 2007 15:47 GMT
Thanks, it worked
 
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.