This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19.8
dataClass.getInfo( )

dataClass.getInfo( ) 


 

dataClass.getInfo () -> Result 
Parameter Type   Description
Result  Object in 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

 

PropertyTypeDescription
namestringName of the dataclass
primaryKeystringName of the primary key of the dataclass
tableNumbernumberInternal 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



See also 

4D Blog - ORDA member methods to get the structure information
dataStore.getInfo( )
entitySelection.getDataClass( )

 
PROPERTIES 

Product: 4D
Theme: ORDA - DataClass

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R5

 
ARTICLE USAGE

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)