S
S
sergeyviktorovich2021-09-29 16:47:00
1C-Bitrix
sergeyviktorovich, 2021-09-29 16:47:00

How to fix $arFilter CFormResult::GetList to search by hidden field value?

gives the first 10 reviews and does not filter, I want to get pictures from the filtered reviews

if (CModule::IncludeModule("form"))
{
  $arFilter =Array(
        "CODE"  => "ID_PRODUCT",     // код поля по которому фильтруем
  "FILTER_TYPE"       => "hidden",
  "PARAMETER_NAME"    => "USER",
  "VALUE" => "2189,971",
 	"EXACT_MATCH"       => "N"
    );

и вот так не ищет 
$arFilter = array("FIELDS" => array(
  0 => array(
    "SID"  => "ID_PRODUCT",     // код поля по которому фильтруем
  "FILTER_TYPE"       => "hidden",
  "PARAMETER_NAME"    => "USER",
  "VALUE" => "2189,971",
 	 "EXACT_MATCH"       => "Y"
  ))
);
   $slideReviewlist = CFormResult::GetList(1,($by="s_timestamp"),($order="desc"), $arFilter, $is_filtered,"N",10);
while ($slideReview = $slideReviewlist->Fetch())
{
    echo "<pre>"; print_r($slideReview); echo "</pre>";
}

}

61546f69e10bd133527827.png

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