I have a block logic that when an item is added to the list and is about to expire in a day, it will call Web1 which will notify the user. The problem is that whenever i switch to screen 1 where the notification command is, it keeps sending the same notification to the user even though its already sent. I tried fixing the logic so that it will only send once but failed. How can i fix this?
As per your logic, it will trigger if the day count reaches less than equal to 1 but greater than 0. Because if the day become less than 0 then the first logic wi trigger and throws x
Just apply some simple logic. Keep a record in TinyDB of notifications sent. Then before sending a notification, check the record and only send if not previously sent.
My blocks are to big to fit in a screenshot and minimizing it might hide important details. I'll try sending you just the logic on how web 1 is called.