Send Email only once and when Text Block was changed
L

Hi!

I want to get notified per email if a user has made changes on a thread or when a given deadline has expired. Regarding the first condition, there is a Text Block where the user can write information. Do you have an idea about how I can check if the content of the Text Block was changed? In this case I could make a request like:

if dialog("Alert", "Send Update?", ["Yes", "No"]) = "Yes" then
sendEmail(...)

If on the other hand a deadline has expired, the user did not make a direct change I could check. I currently ask

if Deadline <= today()

instead. However, by this method Ninox sends emails repeatedly. Do you have any suggestions on how to send this email only once or once a day? 

Many thanks!

 

Ninox Profile

To check if content of field has changed you could add code to the "Trigger after update" property of the field. Regarding the emails, you could use a hidden number field as a variable that is set to either 0 or 1, and only send the email when that variable is changed. Unfortunately, I do not have time right now to test these approaches.

L

Thanks for your reply!
Unfortunately it seems like a dialog or alert box in Trigger after Update is not supported: https://ninox.com/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/dialog-box-from-update-trigger-5bbf944725979e54233efb80?post=5bbf9b9625979e54233efb89&page=1

The only way would be to automatically send an email without asking the user. However, in this case, i would need a variable like you suggest to only send it once. So I created a Number-Field with 0 as Default Value and when I try to change the value in the Formula that sends the email (for example when a Deadline has passed) to 1, Ninox says "This formula may not change the data.". Any suggestions?

Thanks in advance!

Ninox Profile

Please provide a sample of your code.

Reply