OR Statement for retrieve_by_string_fields

Hi,

What is the proper way to format OR statement for retrieve_by_string_fields’ fields_array?

Currently I have this:

$taskBean = $task->retrieve_by_string_fields(array(
‘name’ => ‘Request for OR’,
>>>> ‘status’ => ‘In Progress OR Not Started’,
‘parent_type’ => ‘Users’,
‘parent_id’ => $this->bean->assigned_user_id,
));

How should I format the status?

Best regards!

The first parameter of retrieve_by_string_fields is an array, so you can pass it two field names, but they will be joined by AND in the query.

To do an OR you are probably better off with a different function. Here is an example I found for a different module, you can adapt it to Tasks:

$contact_bean  = new Contact();
$contacts_list = $contact_bean->get_full_list(
    null, 
    '(phone_mobile = "09362724853" OR phone_mobile = "+989362724853")'
    );