How to get Term ID by its custom field? I'd like to get Term ID by its custom field. I would like to do this using EntityFieldQuery().

Here's what I have so far:

  $query = new EntityFieldQuery();
  $entities = $query-&gt;entityCondition('entity_type', 'taxonomy_term')
    -&gt;propertyCondition('vid', '1')
    //I need help with this line:
    -&gt;fieldCondition('field_foo', $fieldValue)
    -&gt;range(0,1)
    -&gt;execute();


Update - I'm providing screenshots to make it more sense.

Here's a view of the custom field



I'm basically trying to get "myTermName" Name field, by "myValue" Foo 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);