Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7097 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

  • 2 weeks later...
Posted

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 )

Posted

I would suggest trying

Filter( FMPcodeslist::OA; "available" ) <> "available" and IsEmpty(Filter( FMPcodeslist::Tabs status; "I" ))

as your validation calculation for the code.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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. :hair:

even if you look and can't figure it out let me know... maybe i will startover from scratch!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.