⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

SetDependentRelation doesn't works with ID=0



matiasnabarro@gmail.com

matiasnabarro@gmail.com
  • profile picture
  • Member

Posted 29 July 2020 - 01:55 AM

Hello! I have this settings in a $crud (Enteprise V2.8.1) :
 

        $crud->setRelation("tbl_tipos_trabajo_id""tbl_tipos_trabajo""tipo_trabajo_abrev");
        $crud->setRelation("tbl_subtipos_trabajo_id""tbl_subtipos_trabajo""subtipo_trabajo");
        $crud->setDependentRelation("tbl_subtipos_trabajo_id","tbl_tipos_trabajo_id","tbl_tipos_trabajo_id");

 

If the parent (tbl_tipos_trabajo_id) index  is 0, the dependent combo remains empty, even if there are items that satisfy the condition. If I change tbl_tipos_trabajo_id to any other number, it works fine. 

Don't know if this is a known issue of GC. 

Best regards.