How to get Term ID by its custom field?
There is undefined value in fieldCondition. there are some examples listed below. try one of these format.

-&gt;fieldCondition('field_foo', 'tid', array('12','13'), 'IN')
-&gt;fieldCondition('field_foo', 'value', 'spotlight', '=')
-&gt;fieldCondition('field_foo', 'fid', 'NULL', '!=')
-&gt;fieldCondition('field_foo', 'tid', $value)
-&gt;fieldCondition('field_foo', 'value', $year. '%', 'like')
-&gt;fieldCondition('field_foo', 'value', NULL);