Hi I have this php code working on CCv5 but I am trying to translate it to ccv6 in where conditions in a read field function
<?phpthis simple code works on ccv6
if(!empty($_POST['filtername1']) && !empty($_POST['filtertext1'])){
$filter1 =$_POST['filtername1'];
$text1=$_POST['filtertext1'];
if(!empty($_POST['filtername2']) && !empty($_POST['filtertext2'])){
$filter2 =$_POST['filtername2'];
$text2=$_POST['filtertext2'];
return array(":{$filter1} LIKE" => "%{$text1}%" , ":{$filter2} LIKE" => "%{$text2}%" );
}else{
return array(":{$filter1} LIKE"=>"%{$text1}%");
}?>
<?phpand also works to assign a variable to field value
return [["venta.num","1997"]];
?>
<?phpbut I couldn't make variable the field to search that comes from a dropdown, is it possible in ccv6?, for example this simple test
return [["venta.num","{data:valor1}"]];
?>
<?phpgives me this error 1054Unknown column 'venta.:{data:filtro1_sel}' in 'where clause'
$this->data['filtro1_sel']="num";
$this->data['valorl']="1997";
return [[":{data:filtro1_sel}","{data:valor1}"]];
?>