Newbies mswiss Posted June 2, 2014 Newbies Posted June 2, 2014 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
comment Posted June 2, 2014 Posted June 2, 2014 The Case() function returns the result of the first test that evaluates as true.
Helpful Harry Posted June 5, 2014 Posted June 5, 2014 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now