Answer the question
In order to leave comments, you need to log in
Where is the error in searching for an infoblock element by a custom property in 1C-Bitrix?
I'm trying to find an infoblock element by a custom property. But the value is the same.
foreach ($docTypeElemList as $docTypeElem) {
$thisSearchArr = [
"IBLOCK_ID"=>$arParams['IB_DOC'],
"ACTIVE"=>"Y",
'IBLOCK_SECTION_ID'=>$docInnerFolder['ID'],
'F_BOND_TYPE'=>$docTypeElem['ID'] // Пользовательское свойство
];
pr($thisSearchArr); // Вывод на экран массива поиска
$thisDocSearch = CIBlockElement::GetList($reqSort, $thisSearchArr); // Поиск
if ($thisDocEl = $thisDocSearch->GetNextElement()) { // Получение элемента (он должен быть один
$thisDoc = $thisDocEl->GetFields(); // Получение списка полей
pr($thisDoc['ID']); // Вывод на экран ID найденного элемента
}
}
File: /local/components/module/catalog.documentation.cat/component.php [19]
Array
(
[IBLOCK_ID] => 4
[ACTIVE] => Y
[IBLOCK_SECTION_ID] => 37
[F_BOND_TYPE] => 50
)
File: /local/components/module/catalog.documentation.cat/component.php [23]
122
File: /local/components/module/catalog.documentation.cat/component.php [19]
Array
(
[IBLOCK_ID] => 4
[ ACTIVE] => Y
[IBLOCK_SECTION_ID] => 37
[F_BOND_TYPE] => 51
)
File: /local/components/module/catalog.documentation.cat/component.php [23]
122
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question