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 5592 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I am trying to calculate the results of a field ussing a CASE statement. I have the following fields:

Quantity (text)

Min Quantity (text)

Max Quantity (text)

LevelWarning

LevelWarning is a calculation with the following:

Case (

Quantiy ≤ Min Quantity-1; "Inventory is LOW";

Quantiy ≥ Max Quantity+1; "Inventory is High";

"Inventory level is OK."

)

This is not write however as it does not return the expected result... just what seems to be random (tho im sure its logical in its own right)

Any thoughts on ware im going wrong would be much appreciated.

Thanks in advance.

Posted

An example of input and result would be useful, but I'll venture a guess anyway: either change the field types to Number, or at least use =

Case (

GetAsNumber ( Quantity ) ≤ GetAsNumber ( Min Quantity ) - 1 ; "Inventory is LOW" ;

GetAsNumber ( Quantity ) ≥ GetAsNumber ( Max Quantity ) + 1 ; "Inventory is High" ;

"Inventory level is OK."

)

BTW, assuming quantities are integers, a ≤ b - 1 can be written simply as a < b.

Posted

Sorry for not being more clear in my post, however your 'reading between the lines" was absolutely correct.

The example you provided worked perfectly. Thanks very much.

For anyone else who may be searching for this answer...more details...

I want to assign a range of inventory level for items. IE: 10 is the minimum to have on hand and 50 is the maximum. If the level drops bellow the min, i want to be notified, if above the max i also want to be notified. Otherwise, the level on hand is OK.

This topic is 5592 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.