Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field Level Validation VS Validation Procedure
Message
From
28/04/1998 14:20:10
 
 
To
28/04/1998 10:45:28
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095389
Message ID:
00095490
Views:
19
Assuming that the first field is a required field, why not put a check for IF EMPTY(fieldname) in its Valid clause? If they leave the field empty, display the "Field Cannot be Blank" message and put them right back into the field with _curobj= objnum(fieldname). If the field is NOT a required field, if a problem is detected from the Save routine, display the error message and put them in the field of question with the _curobj( = objnum(fieldname) and then RETURN.



>Sorry it took so long to get back to you. It has been a nightmare here at work.
>
>At any rate, I will try to describe the problem I am having. If you need any further clarification, let me know. Thanks.
>
>These are the 2 scenarios I have come up with - neither of which is what I want to occur (although a combination of the 2 of them is what I want to occur, but I can't figure out how to accomplish it).
>
>1a) The user adds a record, the first field is blank and the user selects the 'Cancel' button.
>Result: The message 'Edits Canceled' is displayed and the record before the Add button was selected is displayed. This does exactly what I want it to do.
>
>1b)The user adds a record, the first field is blank and the user selects the 'Save' button.
>Result: The message 'Field Can't Be Blank, Try Again' is displayed first, then the message 'Edits Canceled' is displayed. At this point the user is not able to go back and edit the blank field but once again the record before the Add button was selected is displayed. If the user selects the 'Save' button, I want the user to have the ability to edit the record instead of being forced out of the 'adding' mode. This is NOT what I want it to do.
>
>OR
>
>2a) The user adds a record, the first field is blank and the user selects the 'Cancel' button.
>Result: The message 'Field Can't Be Blank, Try again' is displayed. The focus is on the 'Cancel' button where the user must select the 'Cancel' button again to actually cancel the transaction. If the 'Cancel' button is selected, I do not want an error message to be displayed. This is NOT what I want it to do.
>
>2b) The user adds a record, the first field is blank and the user selects the 'Save' button.
>Result: The message 'Field Can't Be Blank, Try Again'. The focus is on the 'Cancel' button where the user must select the 'Cancel' button, but the user still has the opportunity to edit the record. This does exactly what I want it to do.
>
>I somehow want my solution to be (1a) and (2b) but I am unable to figure out how to get these to work at the same time. Any suggestions would be greatly appreciated.
>
>One more tidbit of information. I have field level validations for the various fields where the field can't be empty. I also call a procedure once the 'Save' button is selected which basically duplicates the field level validations in one procedure. This was necessary since the users do not necessarily tab from one field to the next.
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Reply
Map
View

Click here to load this message in the networking platform