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

list2vars

list2vars

The list2vars() analytic transforms the result list obtained from another analytic or from an event set into multiple temporary variables that holds a list of values.

Syntax

list2vars(result,tempvar1,[tempvar2],...,[tempvarn])
The following table describes the required and optional arguments:
Argument
Required
Optional
Description
result
Required
Result list obtained from another analytic or from an event set.
tempvar1
Required
Temporary variable that holds the first value of the list.
tempvar2,...,tempvar
n
Optional
tempvar2 to tempvar
n
that holds 2
nd
value to n
th
value in the list.
Example for Using list2vars from the Event Set
when 3 stock s with list2vars(s.price, a, b, c) then response with body =”value of temporary variable a is ${a}, b value is ${b} and c value is ${c} “
The following table describes the result for the event property value that you pass:
Event Property Value
Description
Result
s.price[2]=10 s.price[1]=20 s.price[0]=30
Assigns values for temporary variables from the latest to the oldest. The first (oldest) event value is assigned to C and the third (latest) event value is assigned to A.
${a} resolves to 30
${b} resolves to 20
${c} resolves to 10
Example for Using list2vars Result List Obtained from Another Analytic
when 1 card c WITH sqlgetAccountInfo(c.customerID) as result != "" AND list2vars(result, FirstName, LastName, AcctID, PurchaseLimit, CardType) then response with body =”value of FirstName is ${FirstName} ,
The SQL Analytic, sqlgetAccountInfo, pulls a row with five columns, casts the row into a temporary variable result, and then uses list2Vars() analytic in the next condition to create multiple temporary variables.
The following table describes the result for the event property value that you pass:
Event Property Value
Description
Result
First Name=John
Last Name=Watson
Account ID=12345
Purchase Limit=1000
CardType=credit
Returns a list and the values are assigned to temporary variables.
FirstName=John
LastName= Watson
AcctID=12345
PurchaseLimit=1000
CardType= credit
The analytics whose result set can be a list are abs, ceil, clean, endswith, even, floor, integer, isblank, isholiday, isnum, istext, isweekeday, isweekend, lower, mround, odd, parse, proper, round, rounddown, roundup, sign, startswith, trim, truncate, and upper.

0 COMMENTS

We’d like to hear from you!