Post

2 followers Follow
1
Avatar

API issue - empty fields, PHP

We have the problem while querying rows with condition “some field is NULL”. The part of the code that does not work and causes the problem below:

$conditionIssue = new stdClass();

$fld = new stdClass();

$fld->FieldName = "Parent";

$conditionIssue->LeftExpression = new SoapVar($fld, SOAP_ENC_OBJECT, 'FieldExpression', $this->soapQApiUrl);

$conditionIssue->Operator = "Equal";

$conditionIssue->RightExpression = null;

$parent_null = new SoapVar($conditionIssue, SOAP_ENC_OBJECT, 'Compare', $this->soapQApiUrl);

I wonder if you can advise how we can select entities without parent in php – as an example we need to get list of projects without parents.

Stas Zmievskoy Answered

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Stas.

The 'null' you need there is actually a field value.

It should be the the value of_ Value_ field of a ConstantExpression inside the RightExpression

Please see the attached sample.

Hope this helps.

Ophir Kenig 0 votes
Comment actions Permalink