Tech Tip: Accessing DataStore function .getGlobalStamp() from 4D Remote or Remote Datastore Session
PRODUCT: 4D | VERSION: 20 R | PLATFORM: Mac & Win
Published On: April 23, 2024
The datastore function .getGlobalStamp() can only be called on a local database or the server database (in a client/server environment). If there is a need for a 4D remote to access this function, follow these steps:
- Create a DataCass for one of the tables.
- Add a function named getGlobalStamp in the DataClass as shown below.
Class extends DataClass exposed Function getGlobalStamp()->$stamp_l : Integer $stamp_l:=ds.getGlobalStamp() |
Once the DataClass is created, the function can be called like so:
$stamp_l:=ds.TableName.getGlobalStamp() // Non remote datastore access |
$remoteDS:=Open datastore(connectioInfo;"myLocalID") $stamp_l:=$remoteDS.TableName.getGlobalStamp() // remote datastore access |