Notify when Date in database has passed a certain date
Question

Hi,

I have a table that contains Lesson details. A lesson has an attribute of DateTime when the lesson will be held. I would like to get notified if it supposes to be lesson time.

For example, Lesson 'A' is scheduled at 14/7/2020 10:00:00. Once the currdatetime has pass this timing, it will notify me, "time for lesson" through a popup (I know how to do a popup). Any tips on how to do this?

Thank you!

Hi Chew Harris,


Create a web block that will fetch schedule data. Use Fake Notify Widget + Javascript timeout . If the schedule is the same on Current Date Time. Use widget click to trigger the Popup.

Web block + Expression and write JavaScript + Fake notify Widget + Widget Click.

 Please see below example:


"<script type='text/javascript'>
$( document ).ready(
    function () {
        if(!int_"+NotifyWidget.Id+") { 
            var int_"+NotifyWidget.Id+" = setInterval(
                function () {
                    OsNotifyWidget('" + NotifyWidget.Id + "', '')
                }, 
                "+Minute+" * 60000);
            }
        });
</script>"


Hope this idea help you. The example dont include the widget clicked.

Hi Chew Harris,

Your can create a timer for that and schedule the timer dynamically at the time of saving lesson data and reschedule it on every lesson edit or any changes.

Thanks.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.