Table of Contents

Search

  1. Preface
  2. RulePoint
  3. RulePoint Concepts
  4. Using RulePoint
  5. RulePoint Objects
  6. Working with Topics
  7. Working with Connections
  8. Working with Sources
  9. Working with Responders
  10. Working with Responses
  11. Working with Watchlists
  12. Working with Analytics
  13. DRQL
  14. Working with Rules
  15. Working with Alerts
  16. Setting Access Controls
  17. Troubleshooting RulePoint Issues
  18. Connecting to an Ultra Messaging Application
  19. Creating an Ultra Messaging JMS Source

User Guide

User Guide

Referencing Temporary Variables in Responses

Referencing Temporary Variables in Responses

You can specify temporary variables previously defined by the AS clause in responses.
To specify the temporary variables, you can set the analytic result as a variable, and then define a condition for the result as shown in the following response:
WHEN 3 stock s, dailystockinfo d group by s.symbol with average(s.price) AS AvgPrice > 0 AND AvgPrice > d.threedayaverage THEN EmailBrokerResponse WITH to="broker@company.com", body="XYZ is trading at the average price of ${AvgPrice}."
  • The group by analytic forces the response to evaluate matching symbols.
  • Setting the analytic result as a temporary variable enables you to reference the result in the responses. Using the previous example, you can include the AvgPrice temporary variable in the response DRQL to display its value in the response.
  • The assignment of a particular result to a temporary variable is valid only during the evaluation of that rule. After the evaluation, the value of that temporary variable is removed.

0 COMMENTS

We’d like to hear from you!