Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatic Alert based on Date value

Super Contributor

Automatic Alert based on Date value

Hello Mega guros


I have two questions which I appreciate your thoughts on:

  • Is there a way to trigger automatic alerts (by email, or pop up message, or anything) through mega?
  • Can that be done by comparing the date value of an attribute of an object to the current date?


2 Replies



you can trigger some kinds of alert (msgbox) with MEGA.

Everything depends on WHEN you want this alert.


We could imagine you want an alert every time a user connects to MEGA.

It's quite easy to do : juste create a metaCommand linked to the "Repository" metaclass.

Create a macro linked to this metaCommand and write a Sub in this macro that represents your test.

Here is an example of what you could write in your macro to trigger an alert if there are applications in your repository with an "Operating application date" older than today :


Sub testDate()
  Dim colApplis, oAppli, cpt, strResult, myDate
  cpt = 0
  Set colApplis = megaEnv.getRoot.getCollection("Application")
  For each oAppli in colApplis
    myDate = oAppli.getProp("Operating Application Date")
    If myDate <> "" Then
      If cDate(myDate) < date() Then
        cpt = cpt + 1
        strResult = strResult & " - " & oAppli.getProp("short name") & vblf
      End If
    End If

  If cpt > 0 Then
    msgbox "The following " & cpt & " applications " & _
"have an operation application date older than today :" & vblf & strResult End If End Sub Call testDate()

There are other methods if you want to trigger an alert every time the attribute is modified, or before dispatch...

If you need more precise help, tell us exactly what you want to do 🙂





Senior Member


Could you please tell us how to trigger an alert every time the attribute is modified, or before dispatch...?


Thank you