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

Home

 
4D v19.8
dataClass.getDataStore( )

dataClass.getDataStore( ) 


 

dataClass.getDataStore () -> Result 
Parameter Type   Description
Result  DataStore in Datastore of the dataclass

The dataClass.getDataStore( ) method returns the datastore for the specified dataclass.

The datastore can be:

  • the main datastore, as returned by the ds command. 
  • a remote datastore, opened using the Open datastore command.

Example  

The SearchDuplicate project method searches for duplicated values in any dataclass.

 C_OBJECT($pet)
 $pet:=ds.Cats.all().first() //get an entity
 SearchDuplicate($pet;"Dogs")

  // SearchDuplicate method
  // SearchDuplicate($1;$2)
  // SearchDuplicate(entity_to_search;dataclass_name)
 
 C_OBJECT($1;$pet;$dataStore;$duplicates)
 C_TEXT($2;$dataClassName)
 $pet:=$1
 $dataClassName:=$2
 $dataStore:=$pet.getDataClass().getDataStore()
 $duplicates:=$dataStore[$dataClassName].query("name=:1";$pet.name)



See also 

entitySelection.getDataClass( )

 
PROPERTIES 

Product: 4D
Theme: ORDA - DataClass

 
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)