osiris612mb Posted August 1, 2005 Posted August 1, 2005 Ok I have an auto enter calc that works perfect. We have codes, if the codes isn't statused as being used,( inactive, available...) the appropriate message appears in that field stating the code is basically invalid. Great! But I want to use validation to prevent the record from being committed if the code is not of the correct status. I have tried a few things like validation with requiring strict data type of numeric... but that doesn't work and it screws up my whole autoenter calc. Can this be done... Should I post my file for a lookover? Thanks -Mike
-Queue- Posted August 4, 2005 Posted August 4, 2005 Try validating the code field with the inverse of your auto-enter calc test. For example, if the auto-enter calc is If( Codes::Status = "inactive"; "invalid code" ) use Codes::Status <> "inactive" for the validation.
osiris612mb Posted August 15, 2005 Author Posted August 15, 2005 hmmm below is my auto-calc, how would I go about making the validation. Maybe I should have posted this the first time. Here we have the status as "I" for invalid and we have the code as available.. yes it is stated in another field but that is how they have been doing this for years now. Let ( [ strip = Filter ( FMPcodeslist::Tabs status ; "I" ) ; strip2 = Filter(FMPcodeslist::OA ; "available"); invalidresponse = TextColor("INVALID CODE "; RGB(255;0;0)) & TextStyleAdd ( Client_Code ; Bold ) ; validresponse = TextColor ( Client_Code ; RGB ( 0 ; 0 ; 0 ) ); response = Case( "available" = strip2 ; invalidresponse; not IsEmpty(strip); invalidresponse; validresponse) ] ; response )
-Queue- Posted August 15, 2005 Posted August 15, 2005 I would suggest trying Filter( FMPcodeslist::OA; "available" ) <> "available" and IsEmpty(Filter( FMPcodeslist::Tabs status; "I" )) as your validation calculation for the code.
osiris612mb Posted August 22, 2005 Author Posted August 22, 2005 Ok maybe I am just too much of a novice, but don't I need the validation to say something like if the client code is not strict numeric, then don't committ? I have tried this but it gave me an error The OA and tabs status are "checks" to see whether the client code(numeric) will stay as input or change to red with the word "invalid" before it.
-Queue- Posted August 22, 2005 Posted August 22, 2005 You can also select the 'Strict Data Type: Numeric Only' option, then deselect the 'Allow user to override' option. If the validation calculation returns zero (false) or the code is not a number, then your custom message (assuming you enter one) will be displayed and the record cannot be committed.
osiris612mb Posted August 23, 2005 Author Posted August 23, 2005 I have tried a few things like validation with requiring strict data type of numeric... but that doesn't work and it screws up my whole autoenter calc. it does this by not allowing the auto-enter calc to enter in the "Invalid Code" in red text before the numeric code. And eventhough the code is incorrect it allows committing of the record. Should I post my DB? I think I might have done something backwards.
-Queue- Posted August 23, 2005 Posted August 23, 2005 What is the calculation for FMPcodeslist::OA? Can you include it in the validation instead of referencing the field? Is it located in the same table? If so, field creation order may be to blame. Feel free to attach a clone of your file.
osiris612mb Posted August 23, 2005 Author Posted August 23, 2005 Attached is my sample file. In the FMPcodelist table is the 5 possabilities of what :OA can be Time_Entry.fp7.zip
osiris612mb Posted August 24, 2005 Author Posted August 24, 2005 oh I am sorry I tried to edit the post but I guess it didn't take.... user is Admin no password
osiris612mb Posted August 26, 2005 Author Posted August 26, 2005 Ok can anyone figure this out? -Queue- made some good tries but for somereason they don't work... i attached the file to a few posts before, with the username admin and the password being blank..... if anyone could take a look at this I would be very very greatful. even if you look and can't figure it out let me know... maybe i will startover from scratch!
Recommended Posts
This topic is 7097 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