ROQL result set (multidimensional array) into single array
Content
Hi all.
I'm doing a ROQL query from a report custom script on a custom field containing an array. I'm trying do get all the results into 1 array so I can perform a count on the data.
Currently I use in the Finish tab the following code
$roql_result = RightNow\Connect\v1_3\ROQL::query( "SELECT Account.CustomFields.c.named_user from Account WHERE Account.CustomFields.c.named_user IS NOT NULL" )->next();
while($result = $roql_result->next())
{
$new_array[] = $result['named_user'];
}$exit_obj[0][0]->val = count($new_array);
This gives an output of 3 as I have 3 accounts with data, I woud like to count the data (output = 6)
2