Data360 Analyze

 View Only
  • 1.  How to write a field value into a Message Body and Subject of an Email node.

    Posted 11 days ago

    I'm fairly new to D360 and would like to achieve something like this. Appreciate anyone to give insight.



    ------------------------------
    clef andrin
    Knowledge Community Shared Account
    ------------------------------


  • 2.  RE: How to write a field value into a Message Body and Subject of an Email node.

    Employee
    Posted 11 days ago
    Edited by Adrian Williams 11 days ago

    You would need to construct the text for each of the property values to be used by the Send Email node.


    As an example:

    Nodes shown on the Data Flow Canvas
    Your upstream nodes are represented here by the 'Test Data' Create Data node. The output of this node has all field data for the email in a single record:
    The output of the Create Data node
    You can use a Transform node to combine the fields into the required Subject value and Body value:
    ConfigureFields and ProcessRecords Scripts
    Subject and Body Text Fields from Transform Node
    The Send Email node would then be configured to use the '(from Field)' option for each of the required properties. Use the drop-down arrow control on the right of the property to select the '(from Field)' option. Use the property context menu (the button with the three horizontal lines) to select the name of the input field that contains the property value.
    Detail of the Send Email Node Properties



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------



  • 3.  RE: How to write a field value into a Message Body and Subject of an Email node.

    Posted 10 days ago
    Edited by clef andrin 10 days ago

    Hi Adrian,

    Thank you very much. Your solution is very straightforward. I was able to make it work on my case. But when there is no data fetched, it does not send any email. I want it to also send something like "Defect Cleanup Notification - 0 Problems Found." My data is coming from a DB query node. How can I achieve this? 



    ------------------------------
    clef andrin
    Knowledge Community Shared Account
    ------------------------------



  • 4.  RE: How to write a field value into a Message Body and Subject of an Email node.

    Employee
    Posted 10 days ago
    Edited by Adrian Williams 10 days ago

    If there are no records output from the query then you can use the Meta Check node to cause the conditional execution of a different Send Email node.

    In this case the Meta Check node is configured with the relevant condition(s) to test - i.e. zero records on it's input (the blue rectangle).

    The SuccessAction determines what the node will do if the conditions pass - in this case enable the output 'Clock' pin on the node (the green rectangle). A run dependency is used to conditionally enable the second Send Email node to execute. The Send Email node can be configured with literal values for the Subject and MessageBody. The Run Dependency is configured to wait for the completion of the Meta Check node.

    Run Dependency set to wait for the completion of the Meta Check node

    The TerminusAction determines hat the node will do if the conditions do not pass - in this case the output 'Clock' pin on the node is not enabled, preventing the Send Email node from running when the query returned at least one record.

    Using the Meta Check node to conditionally execute a Send Email node



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------



  • 5.  RE: How to write a field value into a Message Body and Subject of an Email node.

    Posted 10 days ago

    Thanks a lot, Adrian. At first it was not working, then I deleted the input pin on the email node, and it works fine.



    ------------------------------
    clef andrin
    Knowledge Community Shared Account
    ------------------------------