Callback for "field-update" command
513908
public function cmdUpdateField()
    {
        $params = $this->getParam();

        if (empty($params[0]) || count($params) < 2) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        if (!is_numeric($params[0])) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $this->setSubmitted(null, $params);
        $this->setSubmitted('update', $params[0]);
        $this->validateComponent('field');

        $this->updateField($params[0]);
        $this->output();
    }
567742
public function cmdDeleteFieldValue()
    {
        $id = $this->getParam(0);

        if (empty($id) || !is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        if ($this->getParam('field')) {
            $deleted = $count = 0;
            foreach ($this->field_value->getList(array('field_id' => $id)) as $item) {
                $count++;
                $deleted += (int) $this->field_value->delete($item['field_value_id']);
            }

            $result = $count && $count == $deleted;

        } else {
            $result = $this->field_value->delete($id);
        }

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        $this->output();
    }
32198
def _send_update(self, data):
        """"""
        if isinstance(data, dict):
            data = json.dumps(data)
        self.update_callback(data)
433558
protected function updateField($field_id)
    {
        if (!$this->isError() && !$this->field->update($field_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
527364
def update_custom_field_options(self, custom_field_key, new_options,
                                    keep_existing_options):
        """"""
        custom_field_key = quote(custom_field_key, '')
        body = {
            "Options": new_options,
            "KeepExistingOptions": keep_existing_options}
        response = self._put(self.uri_for(
            "customfields/%s/options" % custom_field_key), json.dumps(body))
1047739
function (value, sendUpdatedEvt) {
			
			var a, firstVal, secondVal, i;
			
			a = value.split(this.options.valueSeparator);
			
			this.selects[0].setValue(a[0], false);
			this.updateSecondSelectChoices();
			this.selects[1].setValue(a[1], false);
			
			// Call Field.setValue to set class and fire updated event
			inputEx.SelectTwiceField.superclass.setValue.call(this, value, sendUpdatedEvt);
		}
323649
protected function preUpdateArtisanCommands()
    {
        collect(config('self-update.artisan_commands.pre_update'))->every(function ($commandParams, $commandKey) {
            Artisan::call($commandKey, $commandParams['params']);
        });
    }
608775
def update_cached_fields(*args):
    
    for a in args:
        if a is not None:
            if hasattr(a, '__iter__'):
                for e in a:
                    e.update_cached_fields()
            else:
                a.update_cached_fields()
667547
def update(self, **kwds):
        
        result = self._client.tag.update(self, **kwds)
        self._replace_fields(result.get_fields())
1029764
def update(self, **kwargs):
        '''  '''
        redis = type(self).get_redis()
        errors = ValidationErrors()

        for fieldname, field in self.proxy:
            if not field.fillable:
                continue

            given = kwargs.get(fieldname)

            if given is None:
                continue

            try:
                value = field.validate(kwargs.get(fieldname), redis)
            except BadField as e:
                errors.append(e)
                continue

            setattr(
                self,
                fieldname,
                value
            )

        if errors.has_errors():
            raise errors

        return self.save()
738948
private void parseFieldUpdate(String fieldName, UNode valueNode) {
        if (valueNode.isValue()) {
            addFieldValue(fieldName, valueNode.getValue());
        } else if (valueNode.childrenAreValues()) {
            parseFieldAdd(fieldName, valueNode);
        } else {
            for (UNode childNode : valueNode.getMemberList()) {
                if (childNode.isCollection() && childNode.getName().equals("add") && childNode.childrenAreValues()) {
                    // "add" for an MV field
                    parseFieldAdd(fieldName, childNode);
                } else if (childNode.isCollection() && childNode.getName().equals("remove") && childNode.childrenAreValues()) {
                    // "remove" for an MV field
                    parseFieldRemove(fieldName, childNode);
                } else {
                    parseFieldUpdate(childNode.getName(), childNode);
                }
            }
        }
    }
1281807
function(props, callback) {
            callback = callback || function() {};
            
            if (props.hasOwnProperty("name")) {
                throw new Error("Cannot set 'name' field in 'update'");
            }
            
            var that = this;
            var req = this.post("", props, function(err, response) {
                if (!err && !that.fetchOnUpdate) {
                    that._load(response.data.entry);
                    callback(err, that);
                }
                else if (!err && that.fetchOnUpdate) {
                    that.fetch(function() {
                        if (req.wasAborted) {
                            return; // aborted, so ignore
                        }
                        else {
                            callback.apply(null, arguments);
                        }
                    });
                }
                else {
                    callback(err, that);
                }
            });
            
            return req;
        }
1067533
def update_callback
      @update_proc.call

      # Accept and eval commands if in console mode
      if @console
        if STDIN.ready?
          cmd = STDIN.gets
          begin
            res = eval(cmd, TOPLEVEL_BINDING)
            STDOUT.puts "=> #{res.inspect}"
            STDOUT.flush
          rescue SyntaxError => se
            STDOUT.puts se
            STDOUT.flush
          rescue Exception => e
            STDOUT.puts e
            STDOUT.flush
          end
        end
      end

    end
1211832
def fire_update_event(self, *args, **kwargs):
        """"""
        for _handler in self._on_update:
            _handler(*args, **kwargs)
529727
def _update_field(self, action, field, value, max_tries, tries=0):
        
        # Refresh our view of the document.
        self.fetch()

        # Update the field.
        action(self, field, value)

        # Attempt to save, retrying conflicts up to max_tries.
        try:
            self.save()
        except requests.HTTPError as ex:
            if tries < max_tries and ex.response.status_code == 409:
                self._update_field(
                    action, field, value, max_tries, tries=tries+1)
            else:
                raise
959107
def updated_current_fields(
            self,
            update_fields):
        
        self.fields_to_add = {}
        for k in self.org_fields:
            self.fields_to_add[k] = self.org_fields[k]
        self.fields_to_add.update(update_fields)
136759
function update_field() {
        global $DB;

        $DB->update_record('data_fields', $this->field);

        // Trigger an event for updating this field.
        $event = \mod_data\event\field_updated::create(array(
            'objectid' => $this->field->id,
            'context' => $this->context,
            'other' => array(
                'fieldname' => $this->field->name,
                'dataid' => $this->data->id
            )
        ));
        $event->trigger();

        return true;
    }