Administrators can configure Email Notification templates to automatically insert data from the related module into the Recipient List, Subject, and Body of the email. The data can provide crucial information, like the Work Order Number, or personalize the notification based on information in the record.
Auto-Inserting Address Data
Lucity stores address data in a series of fields, not all of which every organization uses. To simplify the process of auto-inserting address data in a notification, Lucity provides a special function that concatenates address data, resulting in a more legible format.
Inserting Data from Child Records
Finally, administrators can insert data from fields in children tables—for a single record or for a list of records. This can be useful for communicating addresses, lists of assets, or inspection information via email.
Considerations
What fields do you want to display in your Notification?
What are the field names/table names? To determine:
Open a form in the module associated with the Notification.
Use the button to view the field properties.
Record the field name and table name for the field you want to auto-insert into the Notification.
Open the System Configuration > Notifications module.
Use the button to create a new Notification or open the Notification in which you'd like the data to appear.
Type the field name, enclosed in brackets [ ], at the desired position in the Subject or Message (body). If the field holds an email address it can entered into the Recipent List.
Example: Add the Fleet ID to a Fleet Notification Email.
Please bring vehicle [FL_VEH_CD] [FL_VEH_TY] in for service.
Note: The fields that the user inserts must be stored in the module's main table, not one of its child tables. For example, if adding field data to a a Fleet Notification, the field names must come from the EFFLEET table, not the EFFUEL table.
Save and close the record. Whenever the Email Notification is triggered, the relevant Lucity data will appear in the email.
Open the System Configuration > Notifications module.
Use the button to create a new Notification or open the Notification in which you'd like the data to appear.
Add a line, using the syntax in the example below, into the body of the email. Replace the sample field names with the corresponding field names from the associated module.
Example: Add the address from a record in the Sewer Overflow module
Count Symbol - One parent record can have multiple children records. The count symbol controls how many children records are inserted. There are two options for the Count Symbol value:
1 – Directs the system to show information for only one record in the child table. The system displays data from the first matching record it finds in the list.
* – An asterisk directs the system to show information from every record in the child table.
Table Name – The name of the child table that serves as the data source. (ie WKORDERLOC for Work Order Location)
Field Names – The name of each field in the child table you wish to display. Each field name must be enclosed in brackets [].
Note: This script can also be applied in the Recipient List field to pull email addresses out of fields in a module.
Save and close the record. Whenever the Email Notification is triggered, the relevant Lucity data will appear in the message.
Examples
Add data for the first asset in the Work Order's asset list.
Note: It is not possible to nest child records. In other words, you can not have a #BeginRepeat command for Work Tasks and, inside that, add another #BeginRepeat command for Resources, concluding with an #EndRepeat# command for both.