Skip to content

Record (Record View Widget)

The widget “Record” shows a single record read-only, in the form of its data schema. Which record appears is determined by another widget on the dashboard: currently this is a Start widget with an embedded form that sends its input on a channel. So while a form is being filled in, the details of the selected customer, project or invoice are visible right next to it, without switching to the database.


Typical use cases

Use case Description
Customer for an order A customer is selected in the start form “Auftrag erfassen” (enter order); next to it, the customer's address and contact person are shown.
Checking an invoice An invoice is selected in the start form; next to it, the amounts and due date of the invoice are shown.
Project master data While an activity is recorded, the widget shows the selected project with budget and owner.

How the connection works

  1. A widget Start with the behavior Show form in widget sends the content of its form on a channel with every change. The channel is defined there under Publish model on channel as Channel name; the default is modelChangeChannel.
  2. The widget “Record” listens on this Channel.
  3. A JSONata expression extracts the reference from the message – usually just the technical name of the reference field in the form, for example rechnung.
  4. If the expression yields a record (with id and data_schema_id), an object with id, dataObjectId or data_object_id, or just the id as text, the widget loads this record and shows it. A widget that loads later also receives the last message of the channel.

If the result is empty, the last displayed record stays.


Setting up

  1. Add the widget Start, choose process and start event, Behavior: Show form in widget.
  2. Under Publish model on channel, enter a Channel name, for example rechnungAuswahl, or keep the default.
  3. Add the widget Record and choose Configure display in the properties panel. The dialog Configure record display opens.
  4. Choose the Channel. Offered are the channels of the Start widgets of this dashboard with an embedded form; with exactly one, it is preselected. Without such a Start widget, the dialog cannot be saved.
  5. Enter the JSONata expression, for example rechnung.
  6. Optionally, under Test expression, enter a Sample message (JSON); the Extracted result shows what the expression returns.
  7. Save and publish the dashboard.

Sample message of a start form with the reference field rechnung (invoice):

{ "rechnung": { "id": "01HXYZ", "data_schema_id": "documents/app_accounting/app_invoices" }, "bemerkung": "Bitte prüfen" }

Here the expression rechnung returns the invoice record, and the widget shows the invoice.


Display on the dashboard

  • As long as nothing is selected, the widget says “No selection yet.”
  • The record appears in the form of its data schema, all fields read-only.
  • The button Open in database opens the record in the database in a new tab, provided the person is allowed to read records.
  • An invalid expression is reported as “Invalid JSONata expression in the configuration.”

Limits

  • A click in a Table does not show the record here, because tables do not send anything on a channel.
  • The dialog currently offers only the channels of Start widgets with an embedded form. The Planning board can also send with the step “Publish on channel”; a channel of the board, however, currently cannot be selected in the dialog.
  • Displaying the record that is selected in a Filter container currently cannot be set up in the Designer.
  • Without an expression, the whole message is evaluated. A form content itself has no id – then nothing is displayed.
  • Changes to the displayed record appear only after reloading the page; the refresh button of the dashboard does not reload this widget.