P
P
photosho2021-01-18 13:20:36
1C-Bitrix
photosho, 2021-01-18 13:20:36

Why does an empty selection come up when trying to get a property?

When using "CIBlockElement::getList()" I make a selection over several infoblocks, then if I try to get the property values ​​for the elements (which are in all infoblocks), the selection comes up empty. If you make a selection for one infoblock with the same set of parameters, then the data comes in correctly. If you make a selection by several infoblocks without taking into account properties (do not get properties), then the data comes correct.

Has anyone come across? Mistake?

$result = CIBlockElement::getList(
  ['sort' => 'asc'],
  [
    'IBLOCK_TYPE' => $this->arParams['IBLOCK_TYPE']
  ],
  false, false,
  ['ID', 'IBLOCK_ID', 'NAME', 'PROPERTY_PRICE']
);


Properties - numeric, stored for all infoblocks in one table.

I also noticed that if the "IBLOCK_ID" parameter with an array of identifiers of all the necessary infoblocks is passed to the filter, then the problem is solved. But purely by "IBLOCK_TYPE" the selection is done correctly only as long as we do not try to include any property in the selection.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question