This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
dataClass.getInfo( )
|
dataClass.getInfo () -> Result | ||||||||
Parameter | Type | Description | ||||||
Result | Object |
![]() |
Information on the dataclass | |||||
The dataClass.getInfo( ) method returns an object providing information about the dataclass. This method is useful for setting up generic code.
Returned object
Property | Type | Description |
name | string | Name of the dataclass |
primaryKey | string | Name of the primary key of the dataclass |
tableNumber | number | Internal 4D table number (not returned if the dataclass is from a remote datastore) |
C_OBJECT($1;$e;$status)
$e:=$1 //$1 is an entity
computeEmployeeNumber($e) //do some actions on entity
$status:=$e.save()
if($status.success)
ALERT("Record updated in table "+$e.getDataClass().getInfo().name)
End if
C_OBJECT($es;$settings)
$settings:=New object
$settings.parameters:=New object("receivedIds";getIds())
$settings.attributes:=New object("pk";ds.Clients.getInfo().primaryKey)
$es:=ds.Clients.query(":pk in :receivedIds";$settings)
C_TEXT($pk)
C_OBJECT($dataClassAttribute)
$pk:=ds.Employee.getInfo().primaryKey
$dataClassAttribute:=ds.Employee[$pk] // If needed the attribute matching the primary key is accessible
4D Blog - ORDA member methods to get the structure information
dataStore.getInfo( )
entitySelection.getDataClass( )
Product: 4D
Theme: ORDA - DataClass
Created: 4D v17 R5
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)