<notificationlink>
Allows notifications to be sent via email based on workflows in a board; rendered as a <a> or <button>.
Attribute | Allowed Values | Requirements | Description |
---|---|---|---|
id | text | required | Identifier to ensure multiple notification tags on one board will work. Must be lowercase. |
type | (button|link)link | #implied | How the tag is rendered. |
sendtype | optional | Currently only email is supported. Default: email | |
Subject/Body from views |
You can have a table (board/view combination) that contains a list of "canned" notifications/messages that can be sent. These are identified by the board/view attributes and then the specific record to use is specified in the notificationnamefield/notificationname attributes. If any of these are supplied, then all must be supplied. If these are not used, then one of the other methods of specifying the subject/body fields must be supplied. |
||
notificationboard | text | all four are required if any are used | The name of the board that contains the view that holds the message to be sent. |
notificationview | text | all four are required if any are used | The name of the view that contains the record of the message to be sent. |
notificationnamefield | text | all four are required if any are used | The name of the field in the view that will be matched with the value in notificationname to locate the record that contains the body of the message. |
notificationname | text | all four are required if any are used | The name to match with the contents of the field named by the attribute "notificationnamefield". This is used to locate the record that contains the body of the message. Do note that the notificationbodyfield attribute or something similar is still needed to specify which field within the record contains the body of the message you wish to send. |
Body Attributes | |||
notificationbodyfield | text | optional | Name of the field in the record located by the notificationnamefield and notificationame attributes above that contains the body data. |
notificationbodystring | text | optional | Static text that is hard coded or created pragmatically to be the body of the message. |
notificationbodyelementid | text | optional | Id of an HTML element on the current page that contains the body of the message. |
Subject Attributes | |||
notificationsubjectfield | text | optional | Name of the field in the record located by the notificationnamefield and notificationame attributes above that contains the subject data. |
notificationsubjectstring | text | optional | Static text that is hard coded or created pragmatically to be the subject of the message. |
notificationsubjectelementid | text | optional | Id of an HTML element on the current page that contains the subject of the message. |
Source Data board/view | To send a message to a list of recipients, a board/view/destinationfield combination is supplied. | ||
sourcedataboard | text | optional | Name of the board that contains the expected view. Default - current board. |
sourcedataview | text | optional | Name of the view in the board specified in the sourcedataboard attribute. Default - current view. |
sourcedestinationfield | text | optional | Name of the field in the specified view from the sourcedataview attribute. The values of this field should be email address that you wish to use. Default - "email". |
Source Data Alternate Attributes | Instead of the data in a board/view table, it is possible to send messages to the following destinations. | ||
destinationusername | text | optional | Sends to the email address of the username specified. |
destinationpositionname | text | optional | Sends to all user Ids associated with the position name specified. |
destinationgroupname | text | optional | Sends to all users associated with the group name specified. |
destinationelementid | text | optional | Id of an HTML element on the current page that contains the destination address. |
destinationstring | text | optional | Literal email address to send the message to. If more than one email address is needed they can be separated by a semi-colon ";". Also if the same email address is specified more than once it will not repeatedly send emails for each time the email address is duplicated. |
Miscellaneous Attributes | |||
notificationgeneratedidfield | The notificationQueueItemId is placed in this field when created. This Id is needed if future modifications are needed on the notification record that was generated, such as updating its destination, subject, body, or even its schedule. | ||
Scheduling Option Attributes | |||
recurstartdays | text | optional | Adds this value to the current date. After this value notifications can be scheduled. Default - 0. |
recurend | text | optional | If specified, notifications can occur any time before this value. Default - no end (based on recurtimes). |
recurtimes | text | optional | The max number of times this notification may be sent. Default - 1. |
cronpattern | text | optional | Uses the standard Cron format. Please see below for the Cron pattern. Default - non recurring. |
Multiple recipients/destinations/targets
Multiple recipients may be specified by separating the recipient ids with a semi-colon. for example, if sending to emails: "john@doe.com;mary@jane.com".
Cron Pattern
The Cron pattern uses 5 positions ("* * * * *") that corresponds to parts of a date/time. Those parts in order are minutes, hours, days, months, and days of the week. To represent hours Cron uses 24H formatting and for days of the week uses values 0-6 to represent SUN-SAT.
A '/' can be used to indicate step values. For instance a pattern of "*/5 * * * *" means every 5 minutes. While this is non-standard it is supported.
A ',' can be used to specify multiple values for each time slot. For example, * 8,22 * * * means at 8am and 10pm of every day.
Example Board:
Sample NotificationLink board.web
Example Code
<li>
<notificationlink
notificationboard="Notifications"
notificationview="List"
notificationnamefield="name"
notificationname="Warning Message"
notificationsubjectfield="subject"
notificationbodyfield="body"
sendtime="1"
sourcedestinationfield="primary_contact"
sendtype="email"
notificationgeneratedidfield="note_generatedid"
class="webeoc-actions-link">
<i class="icon-print"/>Send Notifications
</notificationlink>
</li>