Discussions

Expand all | Collapse all

Prevent Notifications to yourself

  • 1.  Prevent Notifications to yourself

    Posted 10-26-2019 12:11
    Good afternoon all!

    I have a table for tasks.  Within the tasks table I have a field with a user list called Additional Task Followers.  This way we can select who gets notifications.  I also have a field for Assigned To which is the person the task is assigned to.

    I have a formula field for Users To Receive Notifications and it combines these two lists.  So it takes Assigned To and Additional Task Followers and makes them one list.

    I have a notification setup so that anytime a task is added, changes, etc. it notifies this Users To Receive Notifications list.  How do I exclude the person making the changes?  It is annoying to get notifications emails everytime we do something.  But the problem is I need to do it dynamically as multiple people could edit that task.

    ------------------------------
    Ivan Weiss
    ------------------------------


  • 2.  RE: Prevent Notifications to yourself

    Posted 11-11-2019 11:11
    Ivan,

    I just utilized a test app, and setup this formula to accomplish what you outlined here:
    var text Users=UserListToEmails(ToUserList(ToUserList([Assigned To]),[Additional Task Followers]));
    var text LastModifiedEmail=UserToEmail([Last Modified By]);

    ToUserList(
    If($LastModifiedEmail<>Trim(Part($Users,1,";")),ToUser(Part($Users,1,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,2,";")),ToUser(Part($Users,2,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,3,";")),ToUser(Part($Users,3,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,4,";")),ToUser(Part($Users,4,";")))
    )

    You could continue the pattern to contain all 20 possible choices for your List-User field. With this formula list user field in place, you would then trigger your notification to go to this list, and it will exclude whomever last edited the record.

    ------------------------------
    Eric Mohlman
    ------------------------------



  • 3.  RE: Prevent Notifications to yourself

    Posted 11-12-2019 13:15
    So would that work between the save and the notification going out?  I would think that formula would only update once you hit save and I am not sure what comes first, chicken or the egg?

    ------------------------------
    Ivan Weiss
    ------------------------------



  • 4.  RE: Prevent Notifications to yourself

    Posted 11-12-2019 13:18
    The record will be fully saved and all fields recalculated, including summary fields,  and then the Notification will fire if the conditions are met.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 5.  RE: Prevent Notifications to yourself

    Posted 11-12-2019 18:06
    Thanks so much everyone!  Just tried implementing this.  I had to tweak that a bit as I actually have (3) fields that I need to combine into my userlist.  I placed this in my "Users to Receive Notifications" field.  The full code I used is as follows and hopefully I got it right!

    var text Users=UserListToEmails(ToUserList(ToUserList([Assigned To]),ToUserList([Additional Task Followers]),ToUserList([Task Owner])));
    var text LastModifiedEmail=UserToEmail([Last Modified By]);

    ToUserList(
    If($LastModifiedEmail<>Trim(Part($Users,1,";")),ToUser(Part($Users,1,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,2,";")),ToUser(Part($Users,2,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,3,";")),ToUser(Part($Users,3,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,4,";")),ToUser(Part($Users,4,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,5,";")),ToUser(Part($Users,5,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,6,";")),ToUser(Part($Users,6,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,7,";")),ToUser(Part($Users,7,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,8,";")),ToUser(Part($Users,8,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,9,";")),ToUser(Part($Users,9,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,10,";")),ToUser(Part($Users,10,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,11,";")),ToUser(Part($Users,11,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,12,";")),ToUser(Part($Users,12,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,13,";")),ToUser(Part($Users,13,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,14,";")),ToUser(Part($Users,14,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,15,";")),ToUser(Part($Users,15,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,16,";")),ToUser(Part($Users,16,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,17,";")),ToUser(Part($Users,17,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,18,";")),ToUser(Part($Users,18,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,19,";")),ToUser(Part($Users,19,";"))),
    If($LastModifiedEmail<>Trim(Part($Users,20,";")),ToUser(Part($Users,20,";")))
    )

    ------------------------------
    Ivan Weiss
    ------------------------------