Local Data Sources

The local data source supports the manual creation of all fields and properties based on the properties of the JSON object.

Getting Started

When the Studio generates all fields from the JSON data, the data source takes the first object from the array and generates the data source fields based on the names of the object properties. The data field types are received from the property values of the object.

Editing Local Data Source

The following example demonstrates a set of sample data.

[
    {
        "author": "Chinua Achebe",
        "country": "Nigeria",
        "imageLink": "images/things-fall-apart.jpg",
        "language": "English",
        "link": "https://en.wikipedia.org/wiki/Things_Fall_Apart\n",
        "pages": 209,
        "title": "Things Fall Apart",
        "year": 1958
    },
    {
        "author": "Hans Christian Andersen",
        "country": "Denmark",
        "imageLink": "images/fairy-tales.jpg",
        "language": "Danish",
        "link": "https://en.wikipedia.org/wiki/Fairy_Tales_Told_for_Children._First_Collection.\n",
        "pages": 784,
        "title": "Fairy tales",
        "year": 1836
    },
    {
        "author": "Dante Alighieri",
        "country": "Italy",
        "imageLink": "images/the-divine-comedy.jpg",
        "language": "Italian",
        "link": "https://en.wikipedia.org/wiki/Divine_Comedy\n",
        "pages": 928,
        "title": "The Divine Comedy",
        "year": 1315
    }
]

Setting the Fields

The local data source provides specific settings which are applied to each field:

  • Name (ReadOnly)—The name of the field which corresponds to the object property name.
  • Label—The label of the field that is generated based on the object property name.
  • Type—The type of the field based on the type from the object property value. The supported types are string, number, boolean, date, and object.
  • Editor Type—Represents the name of the component which will be used as editor for this field. Every field type can be edited by different editors.
  • Required—Represents whether the field is required. If this checkbox is selected while the field is edited in the data form in a view, and the field editor is empty, the form will be invalid.
In this article
Not finding the help you need?