This topic is locked

Search text in 'All Fields Search' with Rest API

6/7/2023 11:29:39 AM
PHPRunner General questions
C
chrisp author

Hello,
I have a field (id_product) from a table (items) which gets the data from another table (products) that is retrieved by a Rest API view. When I do a text search (quick search) in the items grid it doesn't find the text (product). Generally with normal tables (not rest api tables), what I do is add the necessary tables in the query with JOIN (example:
SELECT items.id_product, products.product FROM items LEFT JOIN products ON items.id_product = products.id_product
and I show the text in List, and use the id in Search, Add, Edit... so that the quick search (all fields search) works:
Field Label List Search Add Edit
id_product ID X X X
product Product X
But you can't bind Rest API tables in the query.
Any suggestions?