The eccoMAGIC Forums
http://forums.eccoMAGIC.com/forum/YaBB.pl
the SLANG EXTENSION and Guest Programming >> Slang Rules Scripts, Functions, Examples and HOW TO >> Triggering rule updates based on Dates!
http://forums.eccoMAGIC.com/forum/YaBB.pl?num=1280889887

Message started by Admin on 08/03/10 at 21:44:46

Title: Triggering rule updates based on Dates!
Post by Admin on 08/03/10 at 21:44:46

The extension allows some amazing rules applications based on dates.

++:MS!

Will trigger the rule when the calendar date changes.

The "M"  (Manual) is necessary where the value does not contain calendar math.   If the value contains such date computation,  the M is unnecessary.

The "!" is necessary to update existing values in the folder,  as opposed to just filling in blank folder values.


++:MR!:

Will trigger the rule whenever the date shown in Ecco's calendar view changes.

Thus,  you can update rules based on the calendar date shown.  [GCCD()]


(Note: if you use GCCD() in expression or use other date math,  the "M" manual flag is unnecessary).





Example Application:


In the property management template,  this rule is used:

++:MS!:GPRD("Rent Due"):[Rent Due]



Rent Due is a recurring date folder,   monthly on the day rent is due.

The date the last rent payment was due is derived by the GPRD()  function,  getting prior recurring date.

Since the prior recurring date will change when we pass the next recurring date (the next rental payment due date),  by checking this rule each day, we stay on track.

we could also limit the rule to run only when Rent Due is > 27 days old, eg.,

:[Rent Due] > Today - 27

assuming we have no rental period less than 27 days.




The eccoMAGIC Forums » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.