This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
entity.{attributeName}
|
entity.{attributeName} -> entity.<attributeName> | ||||||||
Parameter | Type | Description | ||||||
entity.<attributeName> | Mixed |
![]() |
Current value of the attribute in the entity | |||||
Any dataclass attribute is available as a property of an entity, which stores the attribute value for the entity.
Note: Dataclass attributes can also be reached using the alternate syntax with [ ].
The attribute value type depends on the attribute kind (relation or storage):
Note: For more information on attribute kinds, please refer to the dataClassAttribute.kind property description.
C_OBJECT($myEntity)
$myEntity:=ds.Employee.new() //Create a new object of the entity type
$myEntity.name:="Dupont" // assign 'Dupont' to the 'name' attribute
$myEntity.firstname:="John" //assign 'John' to the 'firstname' attribute
$myEntity.save() //save the entity
Product: 4D
Theme: ORDA - Entity
Created: 4D v17
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)