AnsweredAssumed Answered

ExecuteSQL to create an array

Question asked by user29439 on Jan 4, 2018
Latest reply on Jan 4, 2018 by philmodjunk

I am getting moving on learning Execute SQL in my solution, and would like to pass an array to a graph in a web viewer.

An example of the array that I am trying to create is essentially this:

Client A, 250 records (counted by sql?)

Client B, 220 records

Client C, 190 records


We would typically have something like 20 companies to track with 1000 or so records to count and assign to clients.


When I wrote the ExecuteSQL function, I used:

ExecuteSQL (

"SELECT  COUNT ( ClientID), ClientID

FROM \"Event Records\"


WHERE \"Date of Event\" > '12/1/2017'


ORDER BY COUNT ( clientid ) ASC

" ; "" ; "" ; "")


The return data is a number of records, a comma, and the ID of the client


I'd like the list to be flipped as above. What have I missed? As always, your help is appreciated.