Forum Discussion

JohnSampath1's avatar
JohnSampath1
Qrew Trainee
5 years ago

Dynamically populating a Formula-List-User field for e-mail distribution purposes

Use Case: I have 3 user fields: Requestor, Reviewer, and Approver.  I also have a status field. Based on the status field value I want to send an e-mail to possibly two or three users. This needs to be one e-mail only so that all users are aware of who got the e-mail.  (i.e. copying the notification multiple items and changing the recipient will not work.) 

What I have tried:  I have set up a formula-list-user field called Distribution_List. I am utilizing the ToUserList function to populate this through a Webhook. On adding a record I am trying to edit the Distribution:List field. (Please see attached image.)

However I am getting a 404 error. I am thinking there are 2 possible issues. (my entire methodology is flawed, my Webhook syntax is incorrect.) 

Any assistance would be greatly appreciated. Thank you. 



------------------------------
John Sampath
------------------------------
  • Can you explain why you were trying to use the webhook?  Why can't you just have a formula list user field and send the email to that field?


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JohnSampath1's avatar
      JohnSampath1
      Qrew Trainee
      Thank you so much for your help. I need to able to dynamically set the formula list user field value  based on status field value.  (If status ="Active" then send email to the approver and reviewer users. If status ="Rejected" then send e-mail to requestor and reviewer users. etc.) These users cannot be hardcoded but come from field values.  This is why I am trying to dynamically set the input parameters for the ToUserList function. I picked a webhook to do this because it did not seems like  dynamic form rules, actions, automations, etc. could do this.  I am open to any solution.  I just want to have one notification which I can use to send e-mails to multiple users for which the users e-mail addresses come from field values.  Thanks. 

      (Sidenote: Sheer coincidence - I found your How to make Quickbase buttons doc online earlier this morning. Great read. Thank you for putting this together) 
       


      ------------------------------
      John Sampath
      ------------------------------
      • JohnSampath1's avatar
        JohnSampath1
        Qrew Trainee
        Solved.  Case([State], "In Progress", ToUserList([Requestor],[Reviewer]), "Not Started", ToUserList([Reviewer],[Approver]), null )

        Thanks to Mark S. for pointing me in the right direction!

        ------------------------------
        John Sampath
        ------------------------------