Block: DataStore

A DataStore block for configuring a store in which data can be saved.

Overview

A DataStore block is used for configuring a store that can contain data from various sources. The data store has a value property, which is the data that is stored. This value is typically a dictionary that has a set of name-value pairs. The data store is non-persistent. Any data that is saved in the data store is lost when the user logs out or the browser window is closed. This block is not visible in the user interface and should therefore not be included in the areas of the frame layout. When a data store subscribes to a data source, then its value is set or updated. For example, a datastore can subscribe to a ControlPanel. When the control panel is submitted, the name-value pairs in the data store are updated to match the names and values in the control panel. The DataStore differs from the EntityDataStore in that it does not have built-in support for managing multiple entities.

Example

Below is an example configuration.

kind: Solution
version: v0
router:
  kind: Router
  routes:
    - frame: home-frame
frames:
  home-frame:
    kind: Frame
    contents:
      my-data-store:
        kind: DataStore
        value:
          length: 10
          width: 20

DataStoreConfig

A DataStore allows users to persist data between frames

Name Type Required Description
kind "DataStore" Yes
value Dictionary<string, any> Yes
subscribe List<DataStoreSubscription> No A list of objects for subscribing the DataStore block to other blocks.

DataStoreSubscription

DataStoreControlPanelSubscription

An object for configuring a subscription from a DataStore block to a ControlPanel block. The subscription allows the data in the data store to be updated based on the data in the control panel.

Name Type Required Description
kind "ControlPanel" Yes A constant, ControlPanel.
frame string Yes A string specifying the name of the frame in which the ControlPanel is located.
source string Yes A string specifying the name of the ControlPanel.

DataStorePopupFormSubscription

An object for configuring a subscription from a DataStore block to a PopupForm block. The subscription allows the data in the data store to be updated based on the data in the popup form.

Name Type Required Description
kind "PopupForm" Yes A constant, PopupForm.
frame string Yes A string specifying the name of the frame in which the PopupForm is located.
source string Yes A string specifying the name of the PopupForm.