Alert sent to specific role(s)

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
I want to create an alert (based on certain criteria) that gets sent to all users in a role. I do not want to specify users because every time I add/remove some from a role i have to manually update my alerts. I want to include on the role(s) in the alert and not people
Photo of Michele Ramachandran

Posted 1 year ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Are you asking about an Email Notification?
Yes ... sorry.  Notification.  Subscriptions can go to all users in a role but notifications only to a list of users.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Sound like "User Voice' is your only option.  Putting in a suggestion for an enhancement.

The only other option I can see is creating a table of users and a checkbox to indicate that he user should receive the Notification.  Set the key field of that table to be the userid.

Then on your details table create a formula user field called [Current user] with a formula of User().
Make a relationship and then send the email to all users in the app, but add a filter where that checkbox is checked.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,044 Points 20k badge 2x thumb
>Sound like "User Voice' is your only option.

Script is your only option!

I can't provide a live demo of a script solution because you would have to be an administrator of the demo to see it work. So I will just show you a screenshot from a working application and provide sample code.

I have an application where the Administrator is dandiebolt@yahoo.com and there are two users in the Participant role: dandiebolt@gmail.com and dan.diebolt@gmail.comIn fact, the two gmail email addresswes actually are just alternate addressed to one Google email account but QuickBase thinks they are two different users. All three users in the demo are named Dan Diebolt. It can get a little confusing who's who so note the two different email domains (yahoo.com and gmail.com) and the period used to distinguish the two gmail email addresses (dandiebolt@gmail.com and dan.diebolt@gmail.com).

Now when I manually invoke the script in the pasties below I will send a custom email to each user in the participant role (dandiebolt@gmail.com and dan.diebolt@gmail.com) gently reminding them that their TPS Reports are overdue. It is a good practice to personalize your emails as it creates good rapport with your employees.

Here is what the received messages look like in my gmail client:



 Pastie Database
 https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=644

(Edited)