It is possible to edit a table record using a form user interface. Every table automatically has an unmodifiable “standard form” which exactly matches the field structure and sequence of its model. A table’s standard form is accessible vis the Data page by clicking the pencil icon above the table’s data gridview

Image showing the "View Data" page and the "Edit Data" icon in the top right

and then pressing either “New Row” or one of the pencil icons in the ACTIONS column

Image showing the "Edit record" icon and the "New row" button

Security

The DATA_EDIT permission is required to be able to edit table records using the standard form. This can optionally be limited to specific tables in a mart.

Image showing the "Add Permission" popup with the "Data Edit" permission being applied

Record Check

Adding a new record will first prompt for the business primary keys (record identifiers) and do a record duplicate check before displaying the whole form.

Image showing a form with the "Record Check" button circled after the Primary Keys have been entered

If it finds an existing matching record, the record is retrieved and switches to update mode:

IMage showing the message which appears if a record has been found. The message says "Found matching record, switching to update mode"

If an existing record is not found, the full empty form is displayed.

# Form Structure

A table’s standard form exactly matches its structure. All fields in the table are displayed on the form and in the sequence defined in the data model. The type of form element that appears on the form is determined by the field data type in the model, ie dates are date pickers, foreign keys are dropdowns, integers are integer fields, etc. Model-level rules such as “is required” or text length limits are automatically applied.

Standard Forms Have “Advanced” Behavior

Standard forms have “advanced” behavior and are better for xMart system experts. Use Custom Forms for “simple” behavior that is better suited for users with limited understanding of xMart.

Standard forms accumulate uncommitted, pending changes across multiple records. It is necessary to commit these records. It is also possible to make edits in the gridview after using the form user interface. For example, after editing 2 records via the form interface, the changes are highlighted in yello and can be further edited before committing.

Image showing the Data Edit page with the number of pending changes, the "Preview" and the "Commit" button circled.

URL

A table’s standard form opens as a new URL following this pattern:

https://{environment domain}/xmart4/{mart code}/data/{table code}/edit