AnsweredAssumed Answered

Is it just me????

Question asked by jfilar3 on Jan 13, 2009
Latest reply on Jan 15, 2009 by Jens Teich


Is it just me????


Hi, all. I'm stuck on a script step (this is a DB I've inherited and I'm trying to maintain for several users).


I have a table (Details) that stores the current case status '(Details::Case Status)' and the date that case status became active '(Details::Case status date)'. If a case is closed for more than 90 days, the record can be purged. I have a button that runs the PURGE script. The first line of that script is:


'If [(Details::Case Status = "Closed" ) and ((Details::Case Status Date + 90 )  > Get ( CurrentDate ))]'


with the idea being that the script checks to see if the case is both CLOSED and the status date (the date it closed) + 90 is beyond the current date. Here are the next few steps:


      'Freeze Window

      Set Field [Details::Case Status; "Purged"]

      Set Field [Case Status Date; Get ( CurrentDate )]

      Refresh Window

Else If [(Details::Case Status Date + 90 ) < Get ( CurrentDate )]'


And it goes on from there with custom dialog that addresses situations where the user cannot purge a record.


Here is the problem - ALL of the Else If statements work just fine. However, the FIRST line (the If statement) only seems to check that '(Details::Case Status = "Closed" )' and seems to ignore the AND part '(Details::Case Status Date + 90 )  > Get ( CurrentDate )'. In other words, as long as the Case Status is showing closed, it purges the record. Am I missing something in the AND statement? I'm guessing it's something obvious and I'm just too absorbed in this to see it......


Thanks in advance!:manvery-happy: