Thanks a lot, Adrian. At first it was not working, then I deleted the input pin on the email node, and it works fine.
Original Message:
Sent: 11-28-2024 10:47
From: Adrian Williams
Subject: How to write a field value into a Message Body and Subject of an Email node.
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.
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.
------------------------------
Adrian Williams
Precisely Software Inc.
Original Message:
Sent: 11-28-2024 10:13
From: clef andrin
Subject: How to write a field value into a Message Body and Subject of an Email node.
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
Original Message:
Sent: 11-27-2024 11:29
From: Adrian Williams
Subject: How to write a field value into a Message Body and Subject of an Email node.
You would need to construct the text for each of the property values to be used by the Send Email node.
As an example:
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:
------------------------------
Adrian Williams
Precisely Software Inc.
Original Message:
Sent: 11-27-2024 09:25
From: clef andrin
Subject: How to write a field value into a Message Body and Subject of an Email node.
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
------------------------------