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 icons in the ACTIONS column

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

Actions Panel

You will notice that there are 2 icons on the ACTIONS panel.

Image showing the Sys_Actions icons in close-up. On the left is a pencil writing on a piece of paper with the caption "Edit Row". On the right is a dustbin with the caption "Delete Row"

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. Any row edits are shown in yellow, any new rows are shown in green and any deleted rows are shown in red.

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

When a row is deleted, the Actions Panel icons change.

Image showing the Sys_Actions icons in close-up. On the left is greyed out icon showing a pencil writing on a piece of paper with the caption "Edit Row is now greyed out". On the right is an arrow going in an anti-clockwse direction with the caption "Undo Delete"

URL

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

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