Closed kty0mka closed 4 years ago
Hi,
Maybe you can use this:
CustomFieldEnumeration.where(:id=> custom_field_value(cf_id).to_s,:custom_field_id => 'cf_id').first
I hope this helps!
Hi @AirTibu,
Thanks! It works)
I think that second filter (:custom_field_id => 'cf_id'
) is unnecessary, because every value has unique enumerator id.
Anyway thank you very much!
When using key/value type custom fields
custom_field_value(cf_id)
returns us key (enumerator id). Is there any way to fetch value?For example: Custom field (key/value) possible values:
I want test if my custom field has orange value, but instead of set value I get 3 (enumerator id of value "orange").