⚙️
API Reference
  • Introduction
  • Features
  • Roadmaps & Requests
  • Frequently Asked Questions
  • Release notes
  • 💡START HERE
    • Terminology
    • Identity and Access Management (IAM)
      • Overview
      • Users in IAM
      • Policies in IAM
      • Roles in IAM
      • Security best practices
    • Dynamic Objects
      • Object Definition
      • Field Definition
      • Data Validation
      • Data Security
        • Encryption
      • Version Control
      • Audit Logs
    • System Architecture Diagram
    • How-To Guides
      • Clinic Project
  • 🔌CORE API Reference
    • Overview
    • Auth
    • Projects
    • Organization
    • Users
    • Roles
    • Policies
    • Objects
    • Item
    • Files
    • Notifications
    • API Request History
    • Auto-Documentation
    • Branches & Merging
    • API Performance
  • ☁️[Coming SOON] YOUR ACCELERATOR PLATFORM ACCOUNT
    • Help and Support
    • Account Page
    • Billing
    • Upgrading an Instance
    • Adjust Server Performance
    • Custom Domain
    • Change Server Region
    • Manage Team
    • API Rate Limit
    • Developer API
  • 🔓SECURITY AND COMPLIANCE
    • Best Practices
    • SOC 2 Type 2 & SOC 3
    • GDPR
    • HIPAA
    • ISO 27001:2013
    • ISO 9001:2015
    • Penetration Testing
  • Accelerator Platform - Core APIs
  • Identity and Access Management
Powered by GitBook
On this page
  1. START HERE
  2. Dynamic Objects

Field Definition

PreviousObject DefinitionNextData Validation

Last updated 2 years ago

In Accelerator Platform, a field is a named data element that is used to store and represent a particular type of information within an object. Fields are used to define the attributes of an object, specifying the types of data that can be stored within the object, such as text, numbers, or dates.

Fields can be customized with different data types and validators, allowing developers to specify the format and rules for each field. For example, a text field might have a maximum length or a specific character set, while a number field might have a minimum or maximum value.

Fields can also be used to define relationships between objects, allowing data to be connected and related in meaningful ways. For example, a field in a customer object might be used to store email address of the user.

Fields are an essential part, providing a flexible and powerful way to store and manage data within any application. By customizing fields and their associated data types and validators, developers can ensure that data is stored and processed correctly, and that data integrity and consistency are maintained.

A field contains the following items :

Key
Description

_id

This is a system generated id

name

This is a unique name of the filed.

label

This a display label for a field

type

type of the field. Table below shows all the field types that are supported

validators

type of validations to apply on this field. The table below shows validators available for different field types

Example a text field type with multiple validators. .

// This is a text field named "Patient Name"
{
        "type": "text",
        "name": "name",
        "label": "Patient Name",
        "validators": {
            "isRequired": true,
            "minChars": 3,
            "maxChars": 50
        }
    }

Accelerator platform offers multiple range of fields. Here is a list of fields that it offers :

Field Type
Data types
Description

text

String

This is used to store any kind of data in a table.

number

Integer/Double

The number field is capable of storing rational numbers.

date

Datetime

The date field accepts dates in a string format conforming to ISO 8601 standards.

email

email

This is used to store email address.

choice

String

This is used when there is a need to store a selection of values from a range of options, a choice field can be used.

file

String

This is used to insert an item that contains a file field, a two-step process is required. First, the file(s) must be uploaded using the UploadFiles API endpoint, which returns a list of IDs of the uploaded files. These IDs can then be used as the file field value when inserting an item.

reference

String

This field is used to store the '_id' of an Item from another Object within the same Organization.

array

JSON Array

This Field is used to store JSON Array.

object

JSON Object

This Field is used to store JSON Object.

Using the field type above you can create any field as per your requirement. Here is an example of a field called "firstName".

// Example of firstName as field type.
{
  "name": "firstName",
  "label": "First Name",
  "type": "string",
  "isEncrypted": true,
  "validators": {
    "isRequired": true,
    "isUnique": true,
    "regex": "string",
    "minChars": 0,
    "maxChars": 0,
  }
}

💡
Check out the list of validators here