PaulStreit
5 years agoQrew Member
Ground rules for triggering an email notification or automation
I have a parent table with a formula checkbox field that does multiple logic calculations and returns "true" when all required conditions have been met. I need to trigger a notification email on each child record in a child table if this formula checkbox field returns "True". In addition, the email notification's trigger will be filtered based on the value of a numerical priority field in the child table record. I'm having trouble making this work because I'm not clear how to trigger the email notifications. I know that an email notification will not trigger on a lookup of the formula checkbox field from the parent table, so that won't work. This use case does not involve adding or deleting records, so the child record somehow has to be modified to trigger the email notification which is in the child table.
I've seen various postings that appear to address this problem, but I'm not clear on exactly what "modified" means in terms of triggering an email notification or automation. For example, should I use a formula-URL field to update a trigger field in the parent record say with the current date/time? If so, will a ?a=dr API command be the equivalent of a manual "save" and so the change to the parent record will be accepted as a trigger for an automation that would in turn change a similar trigger field in each related child record? If an automation changes a field value in a child record, will the email notification recognize the change and trigger? In other words, when an automation changes a field value in a record, does it save the record automatically and will the email notification trigger on that?
I wrote code for the formula-URL field (the name of the formula checkbox field is "Logic Checks Complete" and the field ID of the text trigger field in the parent record is 210). I'm assuming that the display record command is the equivalent of a manual record save and therefore suitable to trigger the automation that will set the trigger field in the child records that will trigger the email notification. Is this right?
IF([Logic Checks Complete]=1,
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fld_210=" & ToText(Now())
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])
)
Thank you,
Paul Streit
------------------------------
Paul Streit
------------------------------
I've seen various postings that appear to address this problem, but I'm not clear on exactly what "modified" means in terms of triggering an email notification or automation. For example, should I use a formula-URL field to update a trigger field in the parent record say with the current date/time? If so, will a ?a=dr API command be the equivalent of a manual "save" and so the change to the parent record will be accepted as a trigger for an automation that would in turn change a similar trigger field in each related child record? If an automation changes a field value in a child record, will the email notification recognize the change and trigger? In other words, when an automation changes a field value in a record, does it save the record automatically and will the email notification trigger on that?
I wrote code for the formula-URL field (the name of the formula checkbox field is "Logic Checks Complete" and the field ID of the text trigger field in the parent record is 210). I'm assuming that the display record command is the equivalent of a manual record save and therefore suitable to trigger the automation that will set the trigger field in the child records that will trigger the email notification. Is this right?
IF([Logic Checks Complete]=1,
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fld_210=" & ToText(Now())
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])
)
Thank you,
Paul Streit
------------------------------
Paul Streit
------------------------------