
Hello,
is ist possible to use custom SQL variables in the To: field of an e-mail action?
For example: ${SQL:Select dbo.getAppAlertMail(${Node.NodeID},${ID})}
Perhaps there is a problem with the colon in the SQL variable definition (${SQL:). In the field "Target" within the table "ActionDefinitions" a colon seems to be used to separate the fields from the values. If thats the case, can the colon be escaped somehow?
Thank you!
Regards
J. Derek
You should be able to insert the Custom SQL as long as it returns a single value, but it will need to be a regular SQL statement. This is what it should look like:
${SQL:Select IP_Address from Nodes where NodeID='${NodeID}'}
Unfortunately, this doesn't seem to work either. I tried it with this Statement:
${SQL:Select Node_AlertEMail from Nodes where NodeID='${NodeID}'}
Node_AlertEMail is a custom field with my e-mail address.
When testing this, the SQL is executed correctly in the Body of the mail but sending the e-mail doesn't work.
When I reopen the e-mail action the custom SQL ist truncated:
Regards
J. Derek
Answer from Solarwinds Support: It's not possible.