Having a Date Expire

Having a Date Expire

  

Hey, guys, is there a way for me to set a Date to expire after a certain period of time?


Certain certifications expire every three years and I need some way to alert automate this to remind staff. Any ideas on how I can implement this within out systems?


Say if I did a DateAquired Entity - can I have it some how expire or alert someone within 90 days of the three year mark? Not sure how to implement this using Out Systems or if there's a better method to do this.

Solution

Hi Jared,

there's no built-in functionality like that in OutSystems, neither in any other programming language that I've heard off :)

You need always to do code that functionality. As you said, you need to store the acquired date, then you should make use of OutSystems Timers, here's the link to know more:

https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Platform_Timers_and_Asynchronous_Processes

In the timer action, you need to calculate the difference in days within the current date and the acquired date to see if 90 days elapsed.

Does it make sense to you?

Cheers,
Miguel

Solution

Jared,

Adding to Miguel's excellent answer, I'd just say that, given you're working with days, you could simply schedule your timer to run once a day.

On it's action, just fetch all records who's expiry date is on the 90 day mark (you can use the DiffDays() function directly on an Aggregate's computed attribute), and for each of them send emails alerting to closing expiration date.

Thank you all for this information! I wish I could make both of you my answer. Thanks guys.