Skip to content
Developerhome

childGet

  Less than to read

Summary

The childGet method is used to retrieve and display the data of a specific child object within a parent screen. It fetches the child object’s data from the Redux store and updates the screen’s initial values, allowing you to populate the screen fields with the retrieved information. This enables users to view and potentially edit the child object’s details.

If you intend to call childPut then it is imperative that you first call api/childGetMetadata before calling childGet.

childGet Parameters

Parameters Description
source Specifies the object node within the parent screen where the child object is located. (Item or Collection)
sourceId (Optional) Identifies the specific child object to fetch if the source parameter refers to a collection.
prefix (Optional) A prefix to separate the data in the Redux store.
isInDialog (Optional) Determines how initialValues are stored. When set to true (default), initialValues are stored separately for child dialogs, maintaining their own version independently. When set to false, initialValues are merged with the main parent screen. If data is to be displayed on the main form (eg in tab), then isInDialog should be set false, so that data is merged into the parent form’s initialValues; for consistent field validation, form dirtiness.

childGet Example

"childGet": {
  "prefix": "myprefix",
  "source": {
    "get": {
      "state": "suppliers"
    }
  },
  "sourceId": {
    "get": {
      "state": "suppliers/selectedRowId"
    }
  }
}