$crud->setRelation with WHERE XXX LIKE 'YYY'

Hi Folks, Yassou!

The “$crud->setRelation” is exactly what I need throughout my project except I’ve got a number of tables with meta info so calling the relation per client makes sense to check the meta and only return the options that relate to [that] client.

Hence, for example with a generic list of options like example…

Pillow {hotel}
Bed Sheet {hotel}
Cups {hotel bar restaurant}
Glasses {hotel bar restaurant}
Table Cloth {hotel restaurant}
Cutlery {hotel restaurant}

… so in this example the dropdown for the bar would only show Cups and Glasses.

I hoped to do a simple where FIELD LIKE %VALUE% to filter the results but so far got nowhere hence this posting here.

Any and all help received with thanks :wink: