Discussions

Expand all | Collapse all

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

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

    Posted 22 days ago
    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
    ------------------------------


  • 2.  RE: Email Notifications: exclude a user in a user list, email the rest of the list

    Posted 22 days ago
    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
    ------------------------------



  • 3.  RE: Email Notifications: exclude a user in a user list, email the rest of the list

    Posted 22 days ago
    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
    ------------------------------



  • 4.  RE: Email Notifications: exclude a user in a user list, email the rest of the list

    Posted 20 days ago
    This worked thank you! I would love a for loop

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