August 10, 200421 yr Hi, I'm adapting the lending library template file to work with our library which lends out items to students. I'd like to set up a calculation so that a 20p fine is charged for each day that an item is kept after the due date. The maximum fine would be
August 10, 200421 yr I'm not sure what the p stands for (pence?), but your calculation for FineAmount would be something like Case( Get(CurrentDate) > DateDue and not Status = "available"; Min( 0.2 * (Get(CurrentDate) - DateDue); 2 ) ).
August 10, 200421 yr I should add that the calculation would need to be unstored in order to update each day.
August 10, 200421 yr The Min function should do that for you. It returns the minimum (smaller) of the two numbers.
August 10, 200421 yr Interestingly enough, once I add the asterisk, I can no longer access the Storage Options. So I would suggest entering Case( Get(CurrentDate) > DateDue and not Status = "available" ; Min( (Get(CurrentDate) - DateDue); 2 ) ) first, setting the Storage Options to 'Do not store', and then adding the "0.2 *" portion.
Create an account or sign in to comment