Forum Discussion

AlexandriaLewis's avatar
AlexandriaLewis
Qrew Member
4 years ago

Email Notifications: exclude a user in a user list, email the rest of the list

What I'm trying to do:
Email "subscribers" user list when entry modified, exclude current user if in list (subscribers) but still email the other users listed.

Condition I tried:
When Subscribers(user list) does not include <the current user>
Result:
blocks the whole list

So I assume I need to make a formula list user field, pull in the subscribers list to iterate over, exclude the user if equal to current user, and use this formula user list to email on modification. I just don't know how to do that in quick base.

Any help is appreciated!

------------------------------
Alexandria Lewis
------------------------------

3 Replies

  • I will respond later tonight if no one beats me to it.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      try this


      var user UserField = [Last Modified by]; // set the user field
      var userlist MyUserlist = [Userlist]; // set the Userlist field

      ToUserList(
      If(ToUser(Part(ToText($MyUserlist),1,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),1,";"))),
      If(ToUser(Part(ToText($MyUserlist),2,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),2,";"))),
      If(ToUser(Part(ToText($MyUserlist),3,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),3,";"))),
      If(ToUser(Part(ToText($MyUserlist),4,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),4,";"))),
      If(ToUser(Part(ToText($MyUserlist),5,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),5,";"))),
      If(ToUser(Part(ToText($MyUserlist),6,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),6,";"))),
      If(ToUser(Part(ToText($MyUserlist),7,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),7,";"))),
      If(ToUser(Part(ToText($MyUserlist),8,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),8,";"))),
      If(ToUser(Part(ToText($MyUserlist),9,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),9,";"))),
      If(ToUser(Part(ToText($MyUserlist),10,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),10,";")))
      )


      I assume that you want to send out an email to a list of users in n a userlist field, but not include emailing he user who just saved the record.  So its [Last Modified by} that we want to remove from the User list.

      You can continue the pattern for up to 20 users.  That formula above will do up to 10 users

      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
      • AlexandriaLewis's avatar
        AlexandriaLewis
        Qrew Member
        This worked thank you! I would love a for loop

        ------------------------------
        Alexandria Lewis
        ------------------------------