Use a Field value in a Query (Seblod Query plugin)

by manishk   Last Updated September 11, 2019 18:10 PM

I'm using the Query plugin that lets me create a Query field on my List & Search.

I have a hidden field with ID 'id_number' which I'm trying to use in my query. When I check the Page Source(Ctrl+U on Chrome), the hidden field has the correct value of id_number which is '22865'.

The part of my Query is-

WHERE [MATCH]||$cck->getValue('id_number')[/MATCH] AND (ban_reason in ("", "active"))

When I print this query out using the Debugger, the Query is using the literal value and querying the above as-

( LIKE '%$cck->getValue(\'id\_number\')%') ....and not like ( LIKE '%22865%')

I also tried using $fields['id_number']->value but it still queries it incorrectly.

Should I not use $cck->getValue('id_number') to get the value of the hidden field in the query? Or is there something other than this that I need to use?

Related Questions

Updated January 06, 2019 18:10 PM

Updated September 05, 2017 09:10 AM

Updated February 21, 2016 01:04 AM

Updated February 26, 2016 01:04 AM

Updated April 22, 2016 08:04 AM