I am trying to send users one email when they are added to a table not each time they are added. How can I do this?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

Hi, I have an app that tracks projects with associated line items. Each project has multiple line items and each line item is associated with a user. Projects and line items are separate tables. I want to send users a notification the first time they are assigned a line item in each project not every time. The users are currently being flooded with emails and would like one line item notification per project. Since the users are associated with the line items and not the project, I can't configure the project notifications to include the users.

I tried creating a new database to list the users to the project but I can't get it to self populate. My next thought is to set up a counter that will track how many line items a users has in a project and send a notification when that equals 1 but I am unsure where to start with this. Does anyone have any advice?

Photo of Andrew

Andrew

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of Xavier Fan

Xavier Fan, Champion

  • 340 Points 250 badge 2x thumb
You could create a summary field in Projects - "# of Line Items for User X", where the Line Item is associated with the specific User X.

Then you can create a lookup field from Line Items, and then trigger the notification when the "# of Line Items for User X = 1".

The problem is that you'd have a create these fields for EVERY user - which makes it not as maintainable if you have even a moderate number of users and/or constant additions / deletions of users.  

Another way around this - is to do a different kind of email.

Instead of sending a notification on the Line Items, you could have a report subscription email - that sends once a day for example.  The report could contain all the Line Items (or Projects) for a specific user (i.e. where "Assigned User" = the current user), created on the day before, etc.  The downside is that this would be sent only once per day, as opposed to immediately when the Line Item is created.  But this could work if you're more concerned about people finding out about Projects they're assigned to.
Photo of Andrew

Andrew

  • 0 Points
Thank you, we went with the subscription type and it is working well.
Photo of Xavier Fan

Xavier Fan, Champion

  • 340 Points 250 badge 2x thumb
Great - glad it helped!