V
V
Vasya2018-05-10 13:42:54
1C-Bitrix
Vasya, 2018-05-10 13:42:54

Why does LOGIC OR Bitrix GetList not work?

$r = CIBlockElement::GetList([],
  [
    [
       "LOGIC" => "OR",
       ["PROPERTY_LINK1" => $arIds],
       ["PROPERTY_LINK2" => $arIds],
       ["WF_PARENT_ELEMENT_ID" => $arIds]
    ],
    "SHOW_HISTORY" => "Y"
  ],
  false, false, ["ID"]);
echo $r->SelectedRowsCount();

If only ["WF_PARENT_ELEMENT_ID" => $arIds] is left, retaining the filter structure, -- will find records.
So, the filter perceives as logic AND

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Skibin, 2018-05-10
@megafax

[
       "LOGIC" => "OR",
       [
              "PROPERTY_LINK1" => $arIds,
              "PROPERTY_LINK2" => $arIds,
              "WF_PARENT_ELEMENT_ID" => $arIds
       ]
    ]

Is that what it meant?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question