Brian Watts
|
| Posted: 06/16/2002, 4:46 PM |
|
I might be missing something, but it at least appears to
be an oversite in the design of CCS... If you use the Cancel
button to enable exiting from a form without updating the
record being edited or added, the mandatory fields are still
checked *even with validation off on the Cancel button*...
It seems to me that if you don't want validation on the Cancel
button, there should be no checking for mandatory fields... no?
Brian
|
|
|
 |
Nicole
|
| Posted: 06/18/2002, 4:44 AM |
|
Hello,
To disable validation when Cancel button is hit just select 'No' in Enable Validation property of Cancel button. Do you have any problems with it?
|
|
|
 |
Brian Watts
|
| Posted: 06/19/2002, 6:58 PM |
|
Yes, or course I have a problem with it -- that is the
purpose of the post... even when Validation is set to 'no',
mandatory fields are checked -- i.e. if you set a field as
mandatory, when the user clicks on cancel, they can not
cancel the form input operation because, the error response
appears -- field 'xx' is required.
|
|
|
 |
Wendy Leung
|
| Posted: 09/18/2002, 11:00 AM |
|
You also need to set the Operation property to "Cancel" under the
Properties->Data tab...
I was having the same problems trying get the Cancel button to behave properly...this modification seems to have done the trick...
|
|
|
 |
Wendy Leung
|
| Posted: 09/18/2002, 11:28 AM |
|
Actually, I should qualify the last post I made...the above post will work if the table that you are NOT trying to insert records into HAS a primary key.
If the table doesn't, you will still be unable to hit the Cancel button and you will still have the contents of your record form updated in your table (without the primary key).
I created a test table without a primary key with a few records and generated a grid and record form (on the same page) in CCS using the "Add New Page" Wizard. I noticed while I was fiddling with the settings on the Record tab that I HAD to specify a primary key from my table. I ended up choosing a field that was of Integer value, just to get the wizard to complete.
I noticed when I viewed the record in the record form and I made some changes in a few fields and hit Cancel, the record got updated anyways...
To get around this, I ended up re-creating the same test table, this time with a primary key and re-entered the same record information. When I re-created the record & grid forms and created a Cancel button, the record form behaved properly by not submitting any record information to the table for updating.
Barring CCS changing their wizards so that you don't need to specify a primary key value for tables you are generating forms for (every table should really have a primary key), the solution right now would be to add primary keys to whatever tables you are trying to create grid and record forms for.
|
|
|
 |
|