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

Recommended Posts

Posted

Hello!

I have a calculation which takes a supply on hand, and subtracts a daily use amount by day. How do I stop it from subtracting once the supply runs out?

To make matters more complicated, the calculation already uses an 'and' statement, as two other variables are involved (ie in A = a certain value, and B = a certain value, then do this calculation). I can't add another 'and' to an 'and' statement, eg if A = certain value and B = certain value and self is < 0, then 0.

Hope this makes sense. Thanks for any help you can give me.

Pat

Posted

Hope this makes sense.

Hope springs eternal, but...

I would think that if someone records using a non-existing resource, then it's not the calculation's fault.

In any case, there's no reason why you couldn't add together several statements using multiple AND operators.

Posted

Hi

which is your actual calculation ?

here it is:

Case (

RXUsagePattern__lxt = "acute-regular" and not IsEmpty ( TotalDailyQuantity__lxn );

OnHandQuantityCount__lxn -

( TotalDailyQuantity__lxn * (Get ( CurrentDate ) - DateOfQuantityOnHand__lxd));

RXUsagePattern__lxt = "acute-regular" and not IsEmpty ( TotalWeeklyQuantity__lxn );

OnHandQuantityCount__lxn -

(TotalWeeklyQuantity__lxn * ((Get ( CurrentDate ) - DateOfQuantityOnHand__lxd) / 7 ));

RXUsagePattern__lxt = "chronic-regular" and not IsEmpty ( TotalDailyQuantity__lxn );

OnHandQuantityCount__lxn -

(( OriginalRefillNumber__lxn - NumberRefillsInOnHandQuantity__lxn) * PrescribedQuantity__lxn) -

(TotalDailyQuantity__lxn * (Get ( CurrentDate ) - DateOfQuantityOnHand__lxd));

RXUsagePattern__lxt = "chronic-regular" and not IsEmpty ( TotalWeeklyQuantity__lxn );

OnHandQuantityCount__lxn -

(( OriginalRefillNumber__lxn - NumberRefillsInOnHandQuantity__lxn) * PrescribedQuantity__lxn) -

(TotalWeeklyQuantity__lxn * ((Get ( CurrentDate ) - DateOfQuantityOnHand__lxd) / 7 ));

""

)

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