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

Recommended Posts

  • Newbies
Posted

Hello!

 

I apologize if this post is not in accordance with forum custom; I'm brand new here!

 

This calculation isn't working and I can't figure out why.

 

Case ((IsEmpty(TimeReturned) and MusicDue="no" );"Current";(IsEmpty(TimeReturned) and IsEmpty(Library Inventory::Paid) and MusicDue="yes");"Due";TimeReturned > 0;"Returned";Library Inventory::Paid > 0;"Paid")

 

I just added the final portion -

LibraryInventory::Paid>0;"Paid"

 

The first three results work everytime - Current, Due, and Returned.  But when the qualifications are met for "Paid," it still reads "Due."  Any thoughts?

 

Thanks,

Matt Swiss

Posted

Yep, it should work if you put the new "Paid" test first.

In fact, from what I can work out (I'm guessing "> 0" is checking the fields are not empty), if you put both of the last two tests at the front,

i.e.

Case (
      Library Inventory::Paid > 0; "Paid";
      TimeReturned > 0; "Returned";
      MusicDue="no"; "Current";
      MusicDue="yes"; "Due";
     )
then you don't need to worry about the IsEmpty parts of the two MusicDue tests.

If Library Inventory::Paid > 0 (is not empty) then the Case statement returns "Paid" and stops.

If ReturnedTime > 0 (is not empty) then the Case statement returns "Returned" and stops.

If the Case statment has got past those two and is still testing, then both ReturnedTime and Library Inventory::Paid must be empty, so the extra IsEmpty functions become redundant.

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