I've custom data stored in custom fields. I've submitted few records as part of the same Contact.
I can use the following API to fetch information about custom group by:
$result = civicrm_api3('CustomGroup', 'get', ['id' => 77]);
which returns:
{
"is_error": 0,
"version": 3,
"count": 1,
"id": 77,
"values": [
{
"id": "77",
...
"table_name": "civicrm_value_myform_77",
...
}
]
}
In that SQL table, I can see multiple records which belong to Contact (entity_id=2
).
How I can list those records using API3? In the format that I can count how many records there are.
I can't list based on Contact, because these records belong to the same one.
Basically I'm looking for something like:
SELECT COUNT(id) FROM civicrm_value_myform_77 WHERE entity_id = 2