Table Data Fields

March 16, 2014 , by

Overview

Every Data Model contains a set of Fields. These provide the framework for how data is accessed and updated within the Data Model. Each field for the data model can be extensively configured in Pistachio. You can see the list of the fields for a data model under the Fields tab. As, you can see, each field we added is assigned a template, display order, and other configuration properties.


Field Management

  • Scan Table – If you added a new field to the table, or would like to add existing fields, you can rescan the table and add new fields.

  • Re-Order fields – provides interface to reorder fields in which they are presented on the screen.

Fields

To manage a field, simply click on the desired field. To add a new field, click on Add New under Fields.

There are four types of fields that can be part of the Data Model.


  • Data - Represents a database field within the database table that the section maps to. The majority of structure elements in general are Data structure elements.
  • File - Holds interfaces for uploading and downloading files.
  • Relationship - Contains interfaces for adding and editing subrecords inline with the main database fields or contains an interface for navigating to subrecords editable on other pages.
  • Static Elements - Holds a block of HTML/plaintext to render between other fields.

The Template field settings is available for only Data and Static Types. Also, various configuration options for fields appear and disappear based on the selected field type.

General Properties

  • Notes to provide ad hoc documentation comments about the field.
  • Field Name is required for every field. For "Data" types, this name should be the name of the field in the database table that the field maps to; For other field types, Field Name also serves as a unique identifier utilized by the Pistachio's HTML interfaces and object model.

  • Field Templates determine how the field is presented to the user and validated when the page is submitted. For example, a template of type Date will render an input with date picker. And, while submission, the system validates to make sure a Date value was entered. Please refer to Field Templates for more information. The various configuration options for fields appear and disappear based on the selected field template. Below is a guide for how to configure a field, configuration tabs.

Data Model

Field Properties

  • Type indicates what type of field it is and is automatically determined by the system.
  • Primary Key indicates whether the field is the table's key field.
  • Read Only Database Field indicates where the field is a readonly database field, and the system should not attempt to update the field in database upon submission.

Validation

  • Required indicates whether the field is required. For the structure types of "Data", "Relationship", and "File", it is also possible to set whether entering data into . These settings do not have an effect on a "Relationship" type if its display type is a "Drilldown" type.
  • Use for Duplicate Check is used to set whether the database field the field maps to is incorporated into duplicate checks that are run when a new record is added.
  • Default Value field allows you to specify the value the structure element will be automatically assigned to on the application add page.

Sorting

  • Default Sort Field is used to specify whether the structure element is used by default to sort search results that are output to the results grids and export reports.

Display

  • Read Only determines whether the field is displayed as readonly text instead of as an input element on the add/edit pages.

Field Label

  • Field Label field is used to specify the text label that should go next to a field when it is rendered.
  • Label Location lets you specify where the field label appears in relation to the input elements.
  • Use Field as Record Title* check-box is used to set whether the field should be used to display the title in the browser's title bar.

Select Where Field Is Available

Here you select where the field appears, and in what capacities it is used.All fields can be set to appear on the "Add", "Edit", and "View" pages. Outside of those three settings, the variety of access settings vary greatly with each field template type.

Data Lookup (For Multiple Choice Template Fields)

  • Lookup Table Name is used to specify the lookup table for the structure element.
  • Filtering Query - A WHERE clause that can be used to filter the lookup list.
  • Field to Display is used to specify the database field that will be displayed in the list of values.
  • Field to Sort On can be used to specify a field within the lookup table that holds the ordering of the lookup table entries; if none is specified, then the ordering will default to the Field to display
  • Field to Group By can be used to group the entries in the lookup table using the value from another database field.
  • Field to Save is used to specify the database field in the lookup table that will provide that actual value that the field will be set to.

Help

Help Text is sued to provide ad hoc documentation regarding this field, that the user can access while using the form.