Triggering an email Notification when a record is 'inserted' into a Database View
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 12:13 AM
I've tried to create an email Notification that triggers when a record is inserted into a Database View, however, it doesn't seem to work. I'm wondering if this is because it's a Database View or whether I'm doing something wrong.
The Database View I'm using is the out of the box 'task_survey_detail'. The condition for my Notification is as follows:
When I navigate to the task_survey_detail_list table and run that condition I get results:
Does anyone have any ideas?
The requirement for me to do this is that Team Leads what to receive an email when a low score is given on our customer satisfaction survey. If there's an alternative way to achieve this I'd be interested to hear it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 12:43 AM
Hi,
Database Views are stored in the "Database View" table (sys_db_view).
Create your own unique event: e.g. dbview_updated (see Register an event )
You can then create an email notification when this event fires, looking for the specific View you wish. You should be able to accomplish it by using this similar example: Notification example: priority 1 incident update
Thanks,
Vinitha.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 01:12 AM
Hi
I'm not sure how this would work. You say that Database Views views are stored in the sys_db_view table and that I should create an event when this table is updated, however, nothing gets updated in those tables, that's just where the joins (View Tables) are stored.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 12:56 AM
You should create a notification on table survey_response and not on a database view. It is important to understand that records are inserted in tables and not in database views.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 01:03 AM
Thanks Majtaba, that's exactly what I thought with regards to the records not being inserted into a Database View.
I don't think I can use the survey_response table because I want to be able to link to the ticket that generated the survey. This only exists on the task_survey table, hence the requirement for the Database View to combine these tables.