R
R
RuRoman2022-02-14 15:14:37
1C-Bitrix
RuRoman, 2022-02-14 15:14:37

How to set up a record filter for bitrix?

For some reason, the filter does not work, I specify in the filter:

$arParams["FILTER_NAME"] = array("!ID"=>ID Определенной записи);

Use of the filter is included
"USE_FILTER" => "Y",
But all the same the filter does not work, the record is deduced.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
no_one_safe, 2022-02-14
@RuRoman

If you carefully read the documentation, and also take into account the name of the parameter, it becomes clear that the FILTER_NAME parameter should be passed not a filter, but the name of the filter.
The filter itself should be declared global (with the name that is passed) and formed separately.

global $arSomeFilterName;
$arSomeFilterName = array('ID'=>1);
$arParams["FILTER_NAME"] = 'arSomeFilterName';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question