A
A
Aricus2021-11-23 13:06:04
1C-Bitrix
Aricus, 2021-11-23 13:06:04

Why can't I get the values ​​of the custom field of the infoblock section?

I'm trying to filter sections of the infoblock by the value of a custom property, or at least get its value in order to do it manually. Tried in different variations (in the file result_modifier.php):

$docsSectionL = CIBlockSection::GetList(
  [],
  ['IBLOCK_CODE'=>'dev_docs', 'ACTIVE'=>'Y', 'UF_DEV'=>$arResult['ID']],
  false,
  ['ID', 'UF_*']
);
while($docsSectionE = $docsSectionL->GetNext()) {
  var_dump($docsSectionE);
}

As a result, I get all the sections (and not just the one I need), and there is no custom field in $docsSectionE . Although it exists, and it is in this infoblock:
619cbc9fb6c9b055919278.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2021-11-23
@Aricus

When selecting custom fields, it must be in the IBLOCK_ID filter, without options.
Therefore, first by IBLOCK_CODE we get its ID, then a selection of sections.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question