Skip to main content

Create a screen from a query

You have a <base>_get query (and ideally its _put / _post / _delete siblings) — the CRUD Wizard is the fastest way to land them. Now you wire a screen on top so users can see and edit the rows.

This page walks the What it is and Data stages of the Screen Designer. Columns, record form, actions and hooks come in the next pages.


Step 1 — Register the app, if needed​

On Liberty Next → Screens → Screens, the connector bar lists every app (= connector) that already has at least one screen. If the connector you want to add a screen to isn't there:

  1. Click + Add scope.
  2. Pick the connector from the dropdown (only connectors without a screens namespace are listed — once registered, the connector becomes an app chip).
  3. The chip appears at the top; the screen list below is empty.

If the connector is already a chip, just click it.


Step 2 — Add a screen​

At the right of the connector bar, click + Add screen. The page prompts for a screen id — letters, digits, underscores, leading letter. Conventions:

PatternExample
Match the table base.customers for a screen on customers_get.
Match the JD Edwards object.F0005 for the JDE UDC table.
<entity>_<purpose> for screens that don't map 1-1 to a table.customer_balance_report, invoice_send_dialog.

The id is stable — it's the URL segment (/screen/<app>/<id>), the configuration key ([screens.<app>.<id>]) and the cross-file reference target. Renaming later goes through the Rename button on the card, which propagates the change across screens / menus / dictionary.

The empty screen appears in the list; click it to open the Screen Designer.


Step 3 — What it is​

The designer opens on its first stage, What it is: identity, the connector override and the behaviour flags. The fields are a single scrolling list, in this order; a dropdown shows the connector the screen runs against, the app's own by default. Under the label and under the description, Label translations and Description translations give each of them in the other languages: one line per language, + add for another.

Screen Designer ·[screens.crm.customers]✕ CancelWHAT IT ISCustomersDATAcustomers_get3 save query(ies)GRID6 column(s)4 filter(s)RECORD FORM1 tab(s)4 field(s)ACTIONS0 toolbar action(s)2 in the row menu · 0 on s…OUTPUTthe grid's own exportBehaviour flags for this screen — auto-load, audit table, row cap, key columns.CONNECTORcrmLABELCustomersShort label shown in the menu / list.LABEL TRANSLATIONSfrFrançais▾Clients✕+ addThe label per language (the tab, the list of screens).DESCRIPTIONCustomers — codes from the sales, names completed by handLonger description shown as the page title.DESCRIPTION TRANSLATIONSfrFrançais▾Clients — codes issus des ventes, noms complétés à la main✕+ addThe description per language (the page's heading).AUDIT TABLEe.g. AUD_USERS — leave blank to disable⋯Save✕ CancelOpens on What it isidentity and behaviourLabelthe menu, the list of screensIn each languagethe tab and the list of screensThe label in French+ add: another languageHeading per languageshown at the top of the pageAudit tablethen the behaviour flags

Field by field​

FieldNotes
ConnectorDefaults to Use the app's connector — <app>. Set explicitly only when the screen reads/writes through a different connector than the one the app is named after (rare but legitimate — e.g. a crm app that reads its reporting tables through a reporting connector).
LabelShort text shown in menus and lists. Falls back to description, then id.
Label translationsThe label in each other language — a language picked in the list (fr Français), then its text. It names the screen's tab and its line in the list of screens for the users of that language. A language with no line shows the label as written.
DescriptionLonger text shown as the page title.
Description translationsThe description in each other language: the page's heading for the users of that language.
auto_loadWhen on, the grid runs the read query as soon as the screen opens. When off, the user clicks Run to fetch. Turn off only for screens with required filter parameters or genuinely expensive queries.
editableWhen on, the grid supports inline cell editing — click a cell, type, press Enter; Save commits via update_query. When off, the user edits only through the dialog.
uploadableWhen on, an Excel / CSV Import button appears in the grid toolbar. Requires key_columns to know which rows are updates vs inserts.
audit_tableSet to a table name (convention: AUD_<TABLE>) to mirror every successful write into it. Each row gets AUD_ACTION (INSERT/UPDATE/DELETE), AUD_USER (the caller's username), AUD_DATE (server timestamp). Blank = no audit.
max_rowsCap on the read query's result. Blank uses the connector's / pool's default (typically 1000).
key_columnsColumns that uniquely identify a row — drives the Excel-import update-vs-insert match and the dialog's edit-mode lock. Leave blank to derive from columns whose key flag is on (the recommended path — see Columns).
initial_group_byOne or more column names — the grid groups by these on first open. The user can ungroup / regroup from the Group control.
treeviewSet when the rows form a parent/child hierarchy — e.g. menu trees, organisation charts. Adds a Tree view toggle alongside Table / Chart. See Concepts → Screens for the full reference.
chart_idA saved chart id (from [charts.*]) — pre-fills the Chart view toggle. Blank uses a session-local default.

When a row is clicked​

The dropdown picks one of three behaviours:

ModeWhat happens
Do nothing (or fall through to the screen's own dialog)Default. If the screen has its own dialog, clicking a row opens it in edit mode. Otherwise the click is a no-op.
Open a sibling Screen as a modal dialogThe row's columns bind into another screen's read query (you pick the target + the binds). That sibling screen's dialog opens as a modal. Useful for master-detail without duplicating dialog markup.
Open a page route in a new browser tabA SPA route — escape hatch for hand-written React pages. Use {column_name} placeholders to interpolate the row's columns (URL-encoded). Example: /nomaflow/runs/{id}.

When both route and Open sibling Screen are set, route wins — the explicit route is the more specific intent.


Step 4 — Data​

Click the Data stage. This is where the screen learns which queries to fire on read and on each write.

Screen Designer ·[screens.crm.customers]✕ Cancel⤡WHAT IT ISCustomersDATAcustomers_get3 save query(ies)GRID6 column(s)3 filter(s) · 1 view(s)RECORD FORM2 tab(s)8 field(s)ACTIONS1 toolbar action(s)2 in the row menu · 1 on s…OUTPUTthe grid's own exportCRUD query refs — the read query is required; the rest are optional and used by the dialog / inline grid editor.FILL FROM TABLEPick…▾READ QUERY ∗customers_getCustomers▾✎⧉+SAVES THROUGH▾Another connector whose endpoints save the rows this screen reads.UPDATE QUERYcustomers_putCustomers▾✎⧉+INSERT QUERYcustomers_postCustomers▾✎⧉+DELETE QUERYcustomers_deleteCustomers▾✎⧉++ All read-query columns addedColumn groups — related 1:1 tables whose columns are edited inline and written back on Save.+ Add column groupSave✕ CancelFill from tablethe four queries at onceRead querythe only one requiredSaves throughread by SQL, saved by an APIWrite queriesupdate · insert · deleteEdit · clone · newthe query, without leavingImport columnsthose of the read queryColumn groupsrelated one-to-one tables
FieldRequiredNotes
Read queryYesThe SELECT that fills the grid. The dropdown is fed from the selected connector's queries list.
Update queryNoThe writable query fired by the dialog's Save in edit mode and the grid's Save button. Convention: <base>_put.
Insert queryNoThe writable query fired by the dialog's Save in add mode. Convention: <base>_post.
Delete queryNoThe writable query fired by the dialog's Delete button (or the grid's per-row delete). Convention: <base>_delete.

Beside each query, three buttons: the pencil (✎) opens the query in its own editor — quick edits don't require leaving the Screen Designer, and that editor saves to connectors.toml directly; the second clones it under a new name; + creates a new one.

Three more settings sit on this stage:

SettingWhat it does
Fill from tablePicks a table and fills the four queries at once from its CRUD queries.
Saves throughAnother connector whose endpoints save the rows this screen reads — see A screen on an API endpoint.
Import N column(s) from the read queryAdds to the grid the columns the read query returns and the screen does not list yet; it reads All read-query columns added when there is none left.

Below, Add column group declares a related one-to-one table whose columns are edited inline and written back on Save; each related column is then tagged with that group (its Group setting, in the column's General tab).

Picking from the CRUD wizard's output​

If you generated the four queries via the CRUD Wizard, they're already in the dropdown — customers_get, customers_put, customers_post, customers_delete. Wire them in order and the screen has full CRUD.

For read-only screens (reports, dashboards, audit views) leave the three write fields blank. The grid still works; the dialog (if any) is read-only; the + Add / 🗑 Delete buttons disappear.


Step 5 — Save and see the result​

Click Save at the bottom right of the designer. The screen is persisted, the hot reload fires, and:

  • A new menu entry for this screen can be added (see the upcoming Menus section).
  • The screen is reachable directly at /screen/<app>/<id>.
  • A user with sql:<connector>:<read_query> permission sees the grid.

Common pitfalls at this stage​

MistakeSymptomFix
read_query unset.Save fails validation.Pick one — the read query is the only required query.
update_query set but key_columns empty AND no key flag on any column.The dialog's Save in edit mode runs the UPDATE without a :NAME_ORIGINAL clause and updates the wrong row.Either set key_columns or mark the key columns in the Columns tab.
editable = true but no update_query.The grid shows the cell editor but the Save button fails.Wire the update_query.
uploadable = true but no key_columns.The importer can't tell update from insert.Set key_columns.
Connector override pointing at a pool the user has no permission on.Sign-in users get an empty grid with no obvious error.Either change the override or grant the user the right sql: permission.
Same screen id reused across apps.The cross-link screen:<app>:<id> is per-app, so collisions across apps are fine. But within the same app, the validator refuses duplicates.Pick unique ids per app.

What's next​

  • Columns — configure each column once for both the grid and the dialog.
  • Dialog builder — the visual designer for the add/edit form.
  • Actions and lifecycle — toolbar buttons, row menus, on_load / on_save / on_insert hooks.