Seems to work well, the rating appears on the search screen!
Searchfields.php
‘rating’=> array(
‘query_type’=>‘default’,
‘operator’=>‘subquery’,
‘subquery’=>‘SELECT AC.contact_id FROM accounts_contacts AC INNER JOIN accounts A ON (contacts.id = AC.contact_id AND A.id = AC.account_id) WHERE A.rating LIKE’,
‘db_field’ => array(
‘id’,
),
Bummer - doesnt work, gives an error when loading the contacts module.
‘rating’=>
array(
‘query_type’=>‘default’,
‘operator’=>‘subquery’,
‘subquery’=>‘SELECT AC.contact_id FROM accounts_contacts AC JOIN accounts A ON A.id = AC.account_id WHERE A.rating LIKE’,
‘db_field’ =>
array(
‘id’,
),
I have set logging to debug.
If I do a search for my field plus another, I can find the query in the Sugar Log but can not see any bit for my field, only the other field.
Also, in the search screen, typing in a value to my field and search blanks out the value. Sort of like its ignoring the field.