value

value

domain: server

language: python

Field class

Description

Use value property to get or set the value of the field.

Getting value

When field data is null, the field converts it to 0, if the field_type is “integer”, “float” or “currency”, or to empty string if field_type is “text”.

For lookup fields the value of this property is an integer that is the value of the id field of the corresponding record in the lookup item. To get lookup value of the field use the lookup_value property.

Setting value

When a new value is assigned, the field checks if the current value is not equal to the new one. If so it

  • sets its new_value attribute to this value,

  • triggers the on_before_field_changed event if one is defined for the field,

  • changes the field data to the new_value attribute and sets it to null,

  • mark item as modified, so the is_modified method will return true

  • triggers the on_field_changed event if one is defined for the field

  • updates data-aware controls

See also

Fields

Lookup fields

lookup_value

text

lookup_text