Skip to main content
Question

Ground rules for triggering an email notification or automation

  • February 13, 2021
  • 0 replies
  • 419 views

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
------------------------------
This topic has been closed for replies.

BrittanyLipinsk
Forum|alt.badge.img+2
Hey Paul,

If I understand correctly, you are trying to trigger an email notification in a child record if the Formula-Checkbox-Field in the parent record changes to true, is that correct?

If that is the case, this could pretty easily be done using "Quickbase Actions".  Pretty simple steps:

  1. Go to your Child table & create a checkbox or something, this will serve later as the notification trigger.  We will call this Child Box A
  2. Create a new Quickbase Action in your Parent Table.
  3. Select "when a reservation is modified" (or added/modified if you want), and select your Formula Checkbox Field under additional criteria.
  4. I would also set under the "If all these conditions are true" section to only execute if said formula checkbox field = true
  5. Then perform an action - would be to edit a related record, select the correct child table.  Set this to change Child Box A to true when these situations occur.
  6. Now you can go to your Child Table & set up an email notification.  If you aren't familiar with them, these will trigger anytime a certain criteria is displayed on execution.
  7. Set up the notification in the Child Table to when a record is modified, and then make sure you click the box for Child Box A that we created.  And again, filter to only continue if this box is equal to true.
  8. From there, you can pick exactly what you want displayed in your email notification & who it should go to.


Let me know if this helps - I am definitely not a QB expert, but I've been using it for several years & always love learning new tricks.

------------------------------
Monster Monster
------------------------------