- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 11:42 AM
Hi all!
I have a custom table u_classroom_codes with 86 records. Every 3 months I replace data in the table with a scheduled data import. I have an email notification set up so that I receive an email letting me know that the table has been updated with current data. I get 86 emails. I assume I'm getting one email for every record that has been updated. I just want to get one single email so that I know the table has been updated. Can someone suggest how to setup my email notification correctly? Below is a screen shot of how it is currently set. Please note I'm a newbie with no scripting experience.
I think the problem is that the table I selected within 'Email Notifications' is my table with 86 records. The notification is doing as it's told and alerting me every time a record is updated. Maybe I can select a different table such as one that that will only have one records which updates upon my successful data load or maybe when my scheduled job has been completed...?
Components:
- Table: u_classroom_codes (always 86 records)
- Data Source: auto_load_classroom_codes
- Table Transform Map: Auto Classroom Code load
- Scheduled Data Import: Classroom Codes
- Registry: classroom_codes_update.completed
- System Policy > Notifications: "Notify that Classroom Codes table data updated"
Much thanks!!
Cathy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 11:59 AM
Hello Cathy,
You can follow these steps to get the notification you want.
1. Create event in System Policy -> Events -> Registry
Name: classroom.import.completed
Table: Import Set
2. Go to the Auto Classroom Code load transform map and select the Transform scripts tab. Create a new transform map script:
When: onComplete
Script:
gs.eventQueue("classroom.import.completed", import_set);
3. Edit your notification to be sent when an event is triggered and select the classroom.import.completed event.
EDIT: Maybe you don't have to create a new event and you can use the one you already have.classroom_codes_update.completed.
Who should receive this email? is it always going to be you? or the person who runs the import?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 05:40 PM
Cathy,
Edited my post but you might not have caught it...
Is u_quarter a reference field by chance? If so, you'll probably want to put the dot walked name of the field you want to add in there. (i.e., target.u_quarter.name or target_u_quarter.displayName)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 05:48 PM
Newbie brain + no scripting experience! Jamie - could you let me know what to write in my script, and which script are you referring to (the notification script or the Transform script)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 05:42 PM
"u_quarter" is a field in my custom table "u_classroom_codes". All of the records for that column will always be the same, for example, it should say "Spring 2015" to indicate that the table was updated for our university's Spring quarter. So I just need to pull in the first of the 86 records and display it in the email. This will verify to me that the import ran correctly and the data are updated.
So far, I am only seeing the SysID.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 05:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 05:31 PM
Cathy,
Can you please again your addEventQueue code?