2 Replies Latest reply on Sep 18, 2014 2:17 PM by MehrdadBastan

Case function

Title

Case function

Post

Hi Eveyone
Once again I need your help in solving this simple problem that is driving me crazy.

I have a database that has one table, 7 fields in which I am trying to track the orders and ship dates from our clients (Schools).

The fields are

School (Text field), Shoot date (Date field), Date Entered (Date field), Due Date Warning (Calculation field)

Date received (Date field), Date Shipped (Date field), Ship Date Warning (Calculation field).

Every school has a Shoot day and they must return their orders to us 10 day after the shoot date. Therefore the warning filed to let us know if they are late sending the orders.

When we receive the orders we enter the Date in Date received

We have 30 day after the shoot date to return the orders. I am trying to keep a tab on when we get the orders and when we have to send them back a little warning signs like "Due" & "Over Due" for both.

This is what I have. Please help. Thanks

For Due Date Warning

If (not IsEmpty (Date Received);"";
Case(Shoot Date="";"";Shoot Date<Get (CurrentDate)-11;"Over Due"; Shoot Date< Get (CurrentDate)-10;"Due"))

For Ship Date Waning

Case(not IsEmpty(Date Shipped);"";
Shoot Date=Get(CurrentDate)-30;"Due";
Shoot Date<Get(CurrentDate)-30;"Over Due")

• 1. Re: Case function

You haven't indicated how this is failing for you...

While I'd re-write the first calculation to get rid of the If function, what you have should calculate correctly provided you click on storage options and make them unstored calculations. They will not update correctly when the system clock's date changes if they are stored calculation fields.

I'd rewrite the first to be:
Case(not IsEmpty (Date Received) ; "" ;
IsEmpty ( Shoot Date ) ; "" ;
Shoot Date<Get (CurrentDate)-11; "Over Due";
Shoot Date< Get (CurrentDate)-10 ; "Due"
) // Case

Caulkins Consulting, Home of Adventures In FileMaking

• 2. Re: Case function

Thanks, That solved the problem I was having