Create a Record View

Record views are interfaces designed for displaying record information and they're created the same as any other interface.

This article describes how to create and configure a read-only record view for a record type.

To create a read-only view for a record type, we'll need to do two things:

  1. Create a record view interface to display the record's information.
  2. Add the record view to the record type so the user can see the view from the record.

Create a record view interface

We will start by creating a read-only interface for displaying the data of each record.

To create the interface:

  1. From your application, click New, then select Interface.
  2. Fill out the Create Interface form, then click CREATE.
  3. From the list of templates on the right, select One Column Page.

    Create Record Type/image 15

    In the example shown, we titled our input Order and set the type to the custom data type for the order entity.

  4. Under Rule Inputs, click to add a new rule input.
  5. In Name, enter the name of the input.
  6. In Type, enter the name of your record type.

We are using the record data type for our rule input. Record data types are unique data types that are automatically created for each record type and can be used to pass record data into an interface as a rule input.

In the example below, we titled our input purchaseOrder and selected the Purchase Order record data type as the type.

screenshot showing the Edit Rule Input dialog with the Purchase Order rule input

Now you can add components to your interface. To connect your components to your record type rule input:

  1. Under COMPONENT CONFIGURATION, find Display Value.
  2. Select the record field from your rule input that you want to display in the component.
  3. Repeat the above steps for each component on your interface to connect them to the rule input.

Once your view is added to your record type, each component connected to your record type via rule input will display the record data for the associated field.

Here's what our simple interface preview looks like with some test data:

screenshot of the view interface, showing 5 fields filled with test data

To learn more about creating interfaces, see Interface Recipe.

Using record data types as rule inputs will only return the field values that are referenced in the interface. If you are going to use a start process link or the write to data store entity smart service function, you should use a CDT as a rule input and create a query for your data. See the Records Tutorial for examples of using CDTs as rule inputs and querying record data.

Add the record view to the record type

Now that we have our interface created, it's time to add the interface as a view to the record type.

To add a view:

  1. Open the record type.
  2. On the left navigation menu, click Views then click New View.

  3. For View Name, enter a name for your view.
  4. For Interface, call your interface and pass the record information for the rule input into your view using rv!record.

Here's how we referenced our interface PurchaseOrderView. Notice that we added a parameter name for the rule input.

rule!purchaseOrderView(PurchaseOrder: rv!record)

For more information on rv!record, see Domain prefixes and Reference a record type and its properties.

You can now save your changes and preview your record view. There's a shortcut to your record list at the top of the record type in the Properties section. Look for a link under Record List URL.

Open in Github Built: Wed, Aug 16, 2023 (04:37:39 PM)

On This Page

FEEDBACK