Set up a Shortcut to Send an Email

The following process shows an example for setting up a shortcut that sends an email when data in an Asset Information Group (AIG) is edited and saved. In this example, we want NEXUS to generate an email each time when any data is edited on the Pipeline AIG.

Prerequisites

Ensure that you have set up your NEXUS email host settings and recipient email addresses. For more information, see Set Up Email.

Process

  1. From the menu, choose Configuration ‣ General ‣ Shortcuts and click Add in the Configuration - Shortcuts dialog.

  2. Enter the name (mandatory) and category (optional) of the shortcut as required. You can also specify a description.

  3. Set up the shortcut trigger. The trigger for sending the email will be data updates in the AIG titled Pipeline. For this, we need an Input Row element.

    1. Under INPUTS, choose the Input Row element and drag it to the grey shortcut editor screen area one.

    2. Double-click the new Input Row element two.

    3. Define the element’s properties as follows three:

      • Name: Specify a unique name for the triggering element.

      • From: Choose On Edit from the drop-down list.

      • Object: Click the ellipsis and select the AIG Pipeline from the list of tables.

    4. Click OK four.


_images/example.email_shortcut_trigger.png

  1. Similarly to the step above, add a Constant input element to define the email recipient. Define its properties as follows:

    • Name: Enter Email Recipient so that the element can be identified later.

    • Type: Specify Alphanumeric.

    • Value: Enter the email address to which you want to send the emails. If required, you can specify multiple email addresses separated by a comma or semicolon.


_images/example.email_shortcut_recipient.png

  1. Add another Constant input element to specify the subject line. Define its properties as follows:

    • Name: Enter Subject Line so that the element can be identified later.

    • Type: Specify Alphanumeric.

    • Value: Enter the text that you want to appear in the subject line of the email, in this case, Pipeline data has changed.


_images/example.email_shortcut_subject.png

  1. Set up the body text of the email by adding a Concatenate String action element. We want the body text to include the data of the pipeline AIG fields that have been changed.

    1. Under ACTIONS, choose the Concatenate String element and drag it to the white shortcut editor screen area one.

    2. Enter the name of the shortcut element so that it can be identified later two.

    3. Click the + button in the bottom right hand corner of the dialog three.

    4. Choose New Item four.

      _images/example.email_shortcut_sentence_builder.png

  1. In the New Shortcut Element dialog, define the element’s properties as follows:

    • Element Type: Select Field from Row. This indicates that the element will retrieve data from a field in a table row.

    • Row: Select Pipeline Row. This refers to the Input Row element that you created for the shortcut trigger.

    • Field: Select Pipeline Name. This refers to the field within the AIG, whose changes you want to track with this shortcut.

    • Return: Select Display Value. This will return the display value of a field, not the functional value. The functional value is usually a unique identifier in the database table, which is not visible to the end users. The display value is the user-friendly name of the field selected above.

    • Name: This field is automatically filled by the system based on your selections above.


_images/example.email_new_field.png

  1. Click OK.

  1. Set up the final action of sending the email by adding a new Email action element. Use the other shortcut elements defined above as input parameters:

    • Name: Enter Send Email so that the element can be identified later.

    • Recipient: Select Email Recipient, which refers to the constant input element that you defined for the recipient.

    • Subject: Select Subject Line, which refers to the constant input element that you defined for the subject line.

    • Body: Select Email Body, which refers to the Concatenate String action element that you defined in the previous step.


_images/example.email_shortcut_send_email.png

  1. The shortcut is set up with all the parameters required. Enable the shortcut by selecting Yes in the Enabled field.


_images/example.email_shortcut_enabled.png

  1. Click OK.

  2. Close and reopen the database for your new shortcut to take effect.

  3. To test this functionality, change some data in the Pipeline AIG and save your changes.