dcecil Posted April 18, 2005 Posted April 18, 2005 I need to keep track of software licenses and hardware warrenties, but need to be alerted somehow when the current date reaches within 90 days of the expiration date field. Is this possible? If so, please describe in detail. I'm a fairly experienced user, but only moderately in the script area. I have managed, however to follow instructions to make pretty complicated scripts and calculations work. Any help would be greatly appreciated. Dave
sbg2 Posted April 18, 2005 Posted April 18, 2005 Define a calculation field, result is text MyExpireCheck = If(ExpireDate ≥ Get (CurrentDate) - 90; "Y";"") Have your script perform a search for MyExpireCheck = "Y"
dcecil Posted April 19, 2005 Author Posted April 19, 2005 When I entered the the calculation If(ExpireDate ≥ Get (CurrentDate) - 90; "Y";"") I get a message saying "Either an operator was omitted, this function cannot be found, or "(" was not expected here" and the [color:"red"] ≥ Get [color:"black"] is highlighted. Any ideas? What is the ≥? Thanks,
sbg2 Posted April 19, 2005 Posted April 19, 2005 Whoops copy and paste threw some weird values in there: If(ExpireDate >= Get (CurrentDate) - 90; "Y";"") use the Greater Than/Equal To operator in place of >=
dcecil Posted April 20, 2005 Author Posted April 20, 2005 I'm still having a problem. I don't think it is recognizing the GET function. I read on the internet that there is a plug-in that will allow the GET command, but this is for version 6. I have version 5 and my company won't let me get the new version (or buy a plug-in). Any ideas? Thanks,
dcecil Posted April 20, 2005 Author Posted April 20, 2005 I fiddled around with the calculation and replaced the GET with STATUS (because it wasn't recognizing the GET function) and replaced the ; with , and it seemed to work. That is until I went to a record that had an expiration date of 4/26/06 and it put YES in the field. Is there any reason why it is ignoring the year in this case? I'm still fiddling around with it, but if you can think of anything, that would be great! Thanks, dcecil
dcecil Posted April 20, 2005 Author Posted April 20, 2005 I don't know what I was thinking. It still does not work. If I put in >=, it ignores the year, if I put in <=, it doesn't work at all.
dcecil Posted April 22, 2005 Author Posted April 22, 2005 Upon close examination, I noticed that it still does not work. It seemed to work, but as I entered other dates (for next year) or changed my computer date to ones that it should have changed to 1, it did not. I don't know that much about scripts, but this seems to be a simple one, but it looks like it is more difficult that I had imagined. I cannot find any script that does this in any FM books that I have.
comment Posted April 22, 2005 Posted April 22, 2005 Can you give an example of an entry in ExpiryDate that produces an incorrect result in cExpiryNear?
BobWeaver Posted April 22, 2005 Posted April 22, 2005 Comment, I think you had a sign reversed in your formula. Also, if you don't want the alert to continue after the expiration date has passed, then the formula will need to be like this: (ExpireDate<= Status(CurrentDate) + 90) and (ExpireDate >= Status(CurrentDate))
comment Posted April 22, 2005 Posted April 22, 2005 Argh! So I have. Sorry. I don't know about the other thing - I would think the alert should be doubled.
BobWeaver Posted April 22, 2005 Posted April 22, 2005 I guess it depends how the user deals with the record as it approaches expiration date. Is the date changed, or the record deleted? If so, no problem. If not, then old records would continue to be flagged forever which would be a nuisance.
Recommended Posts
This topic is 7158 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