...
Description
...
Birthday card notification
...
Summary
...
...
Keywords
...
NotificationTask, Birthday
...
File / Script Link
...
...
Compatibility APM Version
...
N/A
...
Compatibility SQL Version
...
N/A
...
Table of Contents |
---|
minLevel | 1 |
---|
maxLevel | 1 |
---|
type | flat |
---|
separator | pipe |
---|
|
Page Properties |
---|
Summary | This notification task sends an email to all active employees with congratulations on their Birthday. |
---|
Keywords | Birthday |
---|
|
Description
This notification task sends an email to all active employees with congratulations on their Birthday.
Sample setup
...
...
SQL Statement
...
Expand |
---|
|
Code Block |
---|
SELECT
p01.PIN #Pin,
p01.firstname #Firstname,
p01.lastname #Lastname,
email.TELENO as #Email
FROM pw001p01 p01
LEFT JOIN PW001P0T email
ON email.PIN = p01.PIN
AND email.TELETYPE = 6
AND email.TELEPRIORITY IS NOT NULL
AND NOT EXISTS (
SELECT 1
FROM PW001P0T t
WHERE t.PIN = email.PIN
AND t.TELETYPE = email.TELETYPE
AND t.TELEPRIORITY IS NOT NULL
AND (
t.TELEPRIORITY < email.TELEPRIORITY
OR t.TELEPRIORITY = email.TELEPRIORITY
AND t.SEQUENCENO < email.SEQUENCENO
)
)
WHERE
DATEPART(dd, p01.BIRTHDATE) = DATEPART(dd, GETDATE()) AND DATEPART(mm, p01.BIRTHDATE) = DATEPART(mm, GETDATE())
AND NULLIF(email.TELENO, '') IS NOT NULL
AND (p01.Employmentenddate='' or p01.Employmentenddate is NULL)
|
|
Fields Desciprion
Field | Description |
---|
#Pin | The PIN number. |
#Firstname | The First Name of the person. |
#Lastname | The Last Name of the person. |
#Email | The e-mail of the manager(s). |
Sample Email
Hi [#Firstname],
Happy Birthday!
Wishing you a memorable day and that your life is filled with love, harmony and
good health during the coming year. Enjoy the adventure and stay amazing!
...