KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Storage access scopes
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: April 8, 2024

Storage is a feature of 4D that returns a catalog of shared objects and shared collections. The scope of the catalog of items is available to the entire instance of the 4D or 4D Server application. This means that if something is added to Storage on a remote 4D client, it is not applied to the Storage on 4D Server.

To share the value, some execution of code must be triggered on the other instance.
For example, a client can call an Execute on server method to create/update the value of a shared item, and inversely a server can call an EXECUTE ON CLIENT method to apply a value to a shared item in the storage.

This concept also applies to components. Each component has its own catalog that is separate from the host database. As such, calling Storage on a component method will not have the same catalog as a method from the host database. If needed, the values need to be passed as a parameter, or methods need to be implemented to sync the catalog.