Count Query Returns

Hi
I have added a query “count_Active-Clients” how do I get total numbers returned by the query?
I like to use the count in the chart, similar t below
[
{
“x”: “Active”,
“y”: {{count_Active-Clients.data.}}
},
{
“x”: “Pending”,
“y”: 22000
},
{
“x”: “Suspended”,
“y”: 32000
}
,
{
“x”: “Inactive”,
“y”: 32000
}
]

Hi! What’s the response of the count_Active-Clients query? If you simply want to get the total number of records returned, you can use count_Active-Clients.data.length.

Thanks Amelia, it worked like a charm, I have two question since I am very new to this and since we are on the topic.

  1. Is there a tutorial for JS scripting here that can help me?
  2. Is it possible to have a common Query and I could pass the Where condition through the script like how you had devised it, or I need to create query for each condition?

Thanks

Hi Ben! Thanks for confirming it worked. Please check if these docs help:

Thanks for your great help, much appreciated.