Returns the value of a field
554807
def method_missing(m, *args, &block)
      return nil if @is_empty
      if m =~ /\?$/
        # query if a value exists, e.g., r.info.dp? or s.dp?
        v = values[fetch(m.to_s.upcase.chop)]
        return (not VcfValue::empty?(v))
      else
        v = values[fetch(m.to_s.upcase)]
        return nil if VcfValue::empty?(v)
        v = v.to_i if v =~ /^\d+$/
        v = v.to_f if v =~ /^\d+\.\d+$/
        v
      end
    end
363902
private static Object readFieldValue(final Object obj, final Field field) {
    try {
      return field.get(obj);
    } catch (Exception ex) {
      throw new JBBPException("Can't get value from field [" + field + ']', ex);
    }
  }
712747
function(field) {
  var converted = field.fieldId;
  converted.values = field.fieldValues;
  converted.sectionIndex = field.sectionIndex;
  return converted;
}
865707
function getDotValue(obj, field) {
  var fieldParts = typeof field === 'string' ? field.split('.') : field,
    i,
    objs;

  if (!obj) {
    return undefined;
  } // field cannot be empty so that means we should return undefined so that nothing can match

  if (fieldParts.length === 0) {
    return obj;
  }

  if (fieldParts.length === 1) {
    return obj[fieldParts[0]];
  }

  if (util.isArray(obj[fieldParts[0]])) {
    // If the next field is an integer, return only this item of the array
    i = parseInt(fieldParts[1], 10);
    if (typeof i === 'number' && !isNaN(i)) {
      return getDotValue(obj[fieldParts[0]][i], fieldParts.slice(2));
    }

    // Return the array of values
    objs = new Array();
    for (i = 0; i < obj[fieldParts[0]].length; i += 1) {
      objs.push(getDotValue(obj[fieldParts[0]][i], fieldParts.slice(1)));
    }
    return objs;
  } else {
    return getDotValue(obj[fieldParts[0]], fieldParts.slice(1));
  }
}
1279237
public function getFieldValue($object, $field)
    {
        $this->assertObjectInstance($object);

        return $this->getField($field)->get($object);
    }
1072396
def field_value(field)
      element = find_field(field)
      value = (element.tag_name == 'textarea') ? element.text : element.value
      # If field value is an Array, take the first item
      if value.class == Array
        value = value.first
      end
      return value.to_s
    end
946033
def get_schema_field(schema, field):
    
    schema_fields_to_model = {key: get_model_field(schema, key) for (key, value) in schema._declared_fields.items()}
    for key, value in schema_fields_to_model.items():
        if value == field:
            return key

    raise Exception("Couldn't find schema field from {}".format(field))
1014987
private String getField(int key, String undef) {
    String value = fields[key];
    return value == null ? undef : value;
  }
356683
def get_custom_value(self, field_name):
        
        custom_field = self.get_custom_field(field_name)
        return CustomFieldValue.objects.get_or_create(
            field=custom_field, object_id=self.id)[0].value
741144
def Field(self, field, Value = None):
        '''
        
        '''
        if Value == None:
            try:
                return self.__Bitmap[field]
            except KeyError:
                return None
        elif Value == 1 or Value == 0:
            self.__Bitmap[field] = Value
        else:
            raise ValueError
176274
def handle_field(field)
          case field
            when Symbol then return return_symbol_value(field)
            when Array then return  @ldap_object.try(field.first).try(:collect, &field.last)
          end
        end
798280
def get(self, field=None, index=None, lpar=0, prompt=1, native=0, mode="h"):
        """"""

        if field and field != "p_value":
            # note p_value comes back to this routine, so shortcut that case
            return self._getField(field,native=native,prompt=prompt)

        # may prompt for value if prompt flag is set
        if prompt: self._optionalPrompt(mode)

        if index is not None:
            raise SyntaxError("Parameter "+self.name+" is not an array")

        if native:
            rv = self.value
        else:
            rv = self.toString(self.value)
        return rv
47627
def get(self, instance, **kw):
        
        # Gracefully avoid programming errors in Computed fields
        try:
            return self._get(instance, **kw)
        except AttributeError:
            logger.error("Could not get the value of the computed field '{}'"
                         .format(self.get_field_name()))
            return None
1084633
def get_field(self, name):
        """"""
        # We only make the wrappers here (lazily) to avoid creating a ton of objects needlessly.
        field = self._wrapped_fields.get(name)
        if field is None:
            is_fake = False
            field = self._get_internal_field_by_name(name)
            if field is None:
                # Might be a "fake" field in JSON
                is_fake = self._is_fake_field(name)
                if not is_fake:
                    raise AttributeError("No such field %s" % name)
            field = self._make_wrapped_field(name, field, is_fake=is_fake)
            self._wrapped_fields[name] = field
        return field
907598
def _value(self):
        """"""
        if self.data is not None:
            value = self.data._data.get(self.field.to_field.name)
            return str(value)
        return ''
1054013
private static Object getFieldValue(FieldClassValue fieldClassValue, Object obj) {
        try {
            return fieldClassValue.get(obj.getClass()).get(obj);
        } catch (IllegalAccessException e) {
            // FieldClassValueFactory returns ClassValue that make the Field
            // accessible, so this should not happen.
            throw new IllegalStateException(e);
        }
    }
1143073
public function getFieldValue($field, $data = null)
    {
        if ($data !== null && isset($data[$field])) {
            return $data[$field];
        }
        if (isset($this->{$field})) {
            return $this->{$field};
        }
        return null;
    }