Donnie Posted May 18, 2005 Posted May 18, 2005 Greetings; I have a field that marks an employee either Active or Inactive. Once Inactive, I have locked them out of changing the Hire/Exit date with this Validation calculation: EXIT DATE = STATUS <> "InActive". They can not override this error message. We don't want them changing back the Status back to Active so they're able to change the date either, but when I try that calculation, once I change it to Inactive, it won't let me do anything. I can't create a new record, do any finds, or anything on it. It is stuck there in limbo. Is there a work around for this? We also have in big red letters, Inactive Employee Record come up when they change it to Inactive. I think I remember seeing some newsletter where you could make text blink, but I can't find where it was. Any suggestions would be greatly appreciated. Thank you. Don Mayes
Brian C Posted May 20, 2005 Posted May 20, 2005 The trick of a validation calculation is that it's result must always be TRUE, or it will not let you exit the record/find request. For this to work correctly you may want to have a 2nd field that stores the same date information so that there will be something for the validation calc to match to so that the result will be true. When the date is first input while the the status is "Active", the date should be copied to the 2nd date field at that time. Any time the date is changed while the the status flag is Active, it should copy the date to the 2nd field. You could then have the validation calculation be something like: Status = "Active" or Date01 = Date02 This will allow the validation to always result to a "True" result if the status changes to Inactive. Validation calculations are notorious for interfering with find mode - where imo they should actually be ignored. As a result, your calculations must be carefully constructed with this in mind as well if you want to use a field containing a validation calculation on a find layout. For the above scenerio however, you could use the Date02 field on your find layout so that the search is occurring in a field that does not contain a validation calculation. As a result, only the Date02 would need to have indexing turned on in the storage options.
Brian C Posted May 20, 2005 Posted May 20, 2005 P.S. I should mention that if you want a validation calc to work in find mode you need to add: OR status(currentmode) = 1 In this way, if none of the other criteria are true, if you are in find mode, it will allow you to override the other validation options. FYI, the results most commonly referred to with the status(currentmode): 0 = Browse 1 = Find 2 = Preview
Recommended Posts
This topic is 7126 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now