Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SampleTable => [
Is the name of the table, this should match the name, e.g. Table-SampleTable.nmis
  Email => { 
    header => 'Email Address', 
    display => 'key,header,text', 
    value => [""] 
  }
},

Each Column in the table is defined with an entry like this. In this case the column is called Email

To define each column necessary fields are:

    • header - is the what will be displayed when the table is viewed.
    • display - header indicates if it should be in the header or not, and text indicates what sort of input box to use. This includes the work key if it is to be included as the primary key.
    • value - what is the default value or select list.

 

  Married => { 
    header => 'Married', 
    display => 'popup',
    value => ["true", "false"] 
  }
}, 
This field would not be displayed as a textbox in the main view but instead would contain a select list (drop down) to select true or false from.

Display Options

Display controls how the field from the table configuration will be displayed and where it will be displayed, it is a comma separated list of values as shown in the examples above.

Possible values for display are:

ValueDescriptionNMIS Version
header If the value "header" is present, the field will be displayed when viewing the table. All fields are visible when editing an entry.NMIS 8.1.1
key

This value is to be used as a key value, if multiple key values are defined, they will be combined together to make the key

 

of the record.

It is recommended to use a single value for a key value.

NMIS 8.1.1
readonly  
text  
   

...

A readonly field will not be editable, which means it must be added automatically as in the case of something like a UUID or edited from Unix.NMIS 8.3.19G
textThe standard field is a "text" field, this is equivalent to a HTML "input" form element.NMIS 8.1.1
textboxA text box being a little larger higher, this is equivalent to a HTML "textarea" form element.NMIS 8.3.19G
popupA single value select box, this is equivalent to a HTML "select" form element.NMIS 8.1.1
scrollingA multiple select box, where you can select one or more values. This is equivalent to a HTML "select" form element with the attribute of "multiple" set to "multiple".NMIS 8.1.1

Adding a New Table to NMIS

...