Hi, i'm using espo 9.1.8 i wonder how i can get condition for 'status' attribute not in list
i can have 'status' in one of the list :
'status', list('Not Started','Started')
but how to make opposite condition NOT in the list?
probably in Espo 9.2 i can make it with:
$where = object\create();
$where['type'] = 'and';
$where['value'] = list(
(
$it = object\create();
$it['type'] = 'not equals';
$it['attribute'] = 'status';
$it['value'] = 'Completed';
$it;
),
(
$it = object\create();
$it['type'] = 'not equals';
$it['attribute'] = 'status';
$it['value'] = 'Cancelled';
$it;
)
);
$toCreate=record\findMany('Task', 10, 'createdAt', 'desc', $where);
but i can not upgrade Espo version tight now
i can have 'status' in one of the list :
'status', list('Not Started','Started')
but how to make opposite condition NOT in the list?
probably in Espo 9.2 i can make it with:
$where = object\create();
$where['type'] = 'and';
$where['value'] = list(
(
$it = object\create();
$it['type'] = 'not equals';
$it['attribute'] = 'status';
$it['value'] = 'Completed';
$it;
),
(
$it = object\create();
$it['type'] = 'not equals';
$it['attribute'] = 'status';
$it['value'] = 'Cancelled';
$it;
)
);
$toCreate=record\findMany('Task', 10, 'createdAt', 'desc', $where);
but i can not upgrade Espo version tight now
Comment