array( 'data_type' => 'integer', 'primary' => true, 'autocomplete' => true, ), 'SITE_ID' => array( 'data_type' => 'string', ), 'CONDITION' => array( 'data_type' => 'string' ), 'SORT' => array( 'data_type' => 'integer', ), 'TEMPLATE' => array( 'data_type' => 'string' ), 'SITE' => array( 'data_type' => 'Bitrix\Main\Site', 'reference' => array('=this.SITE_ID' => 'ref.LID'), ), (new Fields\ExpressionField( 'EMPTY_CONDITION', "CASE WHEN %s IS NULL OR %s = '' THEN 1 ELSE 2 END", ['CONDITION', 'CONDITION'] )), ); } }