any update sir ?
Query to select unique records in asc/desc order
Please help in creating query in PHP to select unique records in asc/desc order. Below is snip of code we need to select unique and sort results in ascending order
$userQuery = new stdClass();
//Set the name of the entity type you are querying
$userQuery->TypeName = 'WorkItem';
//Select the fields you want retrieved from that entity
$userQuery->Fields = array('C_LOB');
$request = new SoapVar($userQuery, SOAP_ENC_OBJECT, 'EntityQuery', ' http://clarizen.com/api/queries');
$executeResponse = $client->Execute(array("request" => $request));
Looking for your response.
Please sign in to leave a comment.
There are no duplicates in EntityQuery, as each response contains the EntityId (in this case the Workitem ID).
If you want to collect unique value of a certain field, use post processing in your code for it.
If you want to sort the query results, add the Orders property to the query ($userQuery): e.g.
userQuery -> Orders => array(
"FieldName" => "Name",
"Order" => "Ascending"