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 2004

Tip: Looking for answers? Try searching our database.

Users not made to enter required fields before being able to save

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cwrightAGL - 15 Sep 2004 23:33 GMT
I have several fields with 'Cannot be blank' selected in the properties. I am
using Visual Studio, InfoPath SP1 and have a published fully trusted
template. I have a Save button using XDocument.SaveAs that saves the XML file
where I tell it to. How can I force the users to have to complete all
required fields before being able to save?
Greg Collins [MVP] - 16 Sep 2004 02:42 GMT
Add rules to your save button which checks the required fields and displays a dialog box if they are not filled out. Stop the remaining rules from processing if you had to display a dialog box.

If you are using code, you can either perform these checks in code and display a dialog box with thisXDocument.UI.Alert("message"); or you can use the rules from above and set some flag in a secondary data source which the code will check before processing the save.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

I have several fields with 'Cannot be blank' selected in the properties. I am
using Visual Studio, InfoPath SP1 and have a published fully trusted
template. I have a Save button using XDocument.SaveAs that saves the XML file
where I tell it to. How can I force the users to have to complete all
required fields before being able to save?
cwrightAGL - 18 Sep 2004 00:25 GMT
Buttons do not seem to have rules for required fields like text fields. I
didn't see it as an available action under Properties/Rule/Add Action. Am I
missing anything?

I wrote some VB.NET code. It is working well. Here is my code:
If thisXDocument.DOM.selectSingleNode("/my:myFields/my:location_code").text
= ""  Or thisXDocument.DOM.selectSingleNode("/my:myFields/my:address").text =
""  Or thisXDocument.DOM.selectSingleNode("/my:myFields/my:tkn_by").text = ""
Or thisXDocument.DOM.selectSingleNode("/my:myFields/my:assigned_to").text =
""  Or thisXDocument.DOM.selectSingleNode("/my:myFields/my:date_taken").text
= "" Then  thisXDocument.UI.Alert("Please fill out all required fields in
blue.") End If

Thanks.

Catherine
Catherine.

> Add rules to your save button which checks the required fields and displays a dialog box if they are not filled out. Stop the remaining rules from processing if you had to display a dialog box.
>
[quoted text clipped - 5 lines]
> where I tell it to. How can I force the users to have to complete all
> required fields before being able to save?
 
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.