Create a Record Type

In this article, you will learn how to create and configure a record type that can be accessed from the Records tab. For guided walkthroughs on creating records, check out our tutorials.

A record type allows you to define a set of records from your business data and processes, and create views for that data that you can make available to your users. Before creating a record type, it may be helpful to review how records are used in Tempo.

Create the Record Type

Record types are created in Appian Designer.

  1. Open the destination application for the new record type.

  2. Click New, then choose Record Type from the dropdown menu.

  3. Fill out the Create Record Type form.

  4. Once you’ve named and described your record type, you can click Create & Edit to start editing the record type immediately, or click Create to just create the object.


Define a Data Source

Every record type needs a data source defined that consists of a set of records. This can be a table or view within your data store, the running processes of a process model, or an external data source.

This section explains how to configure each within the Data section of the record type.

Define a Data Store Entity as the Source for a Record Type

Any data store entity can be used as the source for a record type. Every row in that entity will be treated as an individual record of your record type. This is known as an "entity-backed record." This is the most common type of record, and is the easiest to configure.

To create an entity-backed record,

  1. Select Data Store Entity from the Source dropdown.

  2. Click on the Data Store dropdown to select a data store from your application.

  3. Click on the Entity dropdown to select an entity from the selected data store.

Define a Process Model as the Source for a Record Type

Any process model can be used as the source for a record type. Each running instance of that process model will be treated as an individual record of your record type. This is known as a "process-backed record." This type of record is less common, and can be a little more challenging to configure. It may be helpful to do the Records Tutorial, which has a section on process-backed records.

To create a process-backed record,

  1. Choose Process Model from the Source dropdown.

  2. Enter the name of the process model in the Process Model field.

Define an Expression as the Source for a Record Type

Any expression that results in either a data subset, dictionary, or a list of the selected custom data type can be used as the source for a record type. Each row in the data subset will be treated as an individual record of your record type. This is known as an "expression-backed record." This type of record is most commonly used to create records from external data sources, and can be a little more challenging to configure. We recommend newer users do the Expression-Backed Records Tutorial.

To create an expression-backed record,

  1. Choose Expression from the Source dropdown. alt text

  2. Enter a custom data type in the Data Type field. This custom data type must match the data contained in each record of the data subset.

  3. Enter the expression that returns a list of records in the List View Source Expression field. The expression must return either a data subset, a list of the selected custom data type, or a dictionary. Each row maps to the selected custom data type.

  4. Enter the expression that returns an individual record in the Record View Source Expression field. The expression must return either a data subset, the selected custom data type, or a list of the selected custom data type.

By using two expressions, designers no longer need to add logic to decide whether to display a list view or a record view. Also, designers no longer need to cast the result of an expression to a data subset.

The following variables are available in the rsp! and rp! domain respectively to provide easy access to them:

  1. rsp!searchText: The text entered by end users in the record's list search box.

  2. rsp!pagingInfo: The paging and sorting configurations applied to the record list.

  3. rsp!filters: An array containing the record type's default filters as well as the user filter selections.

  4. rp!id: The id of the record type instance. Accessible from the record view source expression only.

We recommend using the variables listed above instead of using the the query object by using rsp!query.


Create a Record List

The record list is the list of records the user sees once they’ve clicked on this record type from the Records tab in Tempo.

The record list can be displayed as a feed or a grid. When the list is a feed, each record is displayed in a vertical list like a news feed. When the list is a grid, the records display in rows like a spreadsheet.

In the screenshot below, you can see the same set of records displayed in both a feed (left) and a grid (right).

One of the advantages of a grid-style list is the ability to sort on columns. By default, new record types are created with a grid-style list.

Allow your Record List to be Exported to Excel

You can allow users to export record lists that are displayed as a grid to Excel. Simply select the checkbox under the Record List section that allows users to see an Export to Excel button. Record viewers can click this button to download a copy of their filtered record lists in Excel.

For additional information, see: Optimizing Record Lists for Export to Excel.

screenshot

Create a Grid-Style Record List

Grid-style record list is the default list for new record types. The grid-style list is configured with a new interface that is much like the design view of an interface. This interface allows you to easily navigate and configure the components of this grid.

To give your records a title that will display at the top of every record view, go to the Record View Details section and enter a title in the Record Title field. This is an expression field, so encase text values in quotes.

To configure your grid-style list, go up to the Record List section and click Edit Record List.

If this is a new record, you'll notice that there's already a grid configured here. We grab a few columns from your data source just to get you started. We also put a record link component in the first column so users can click to the record directly.

Don't worry, you're not stuck with this grid; you can add, remove, and change any column. If you’ve worked with the design view before, this interface should be familiar.

There are three main levels to the record grid that you can easily navigate from the navigation panel on the left: (1) Grid level, (2) Column level, and (3) Component level.

Grid-Level Settings

A grid’s general settings allow you to set which columns to display, how many rows to display per page, and the default sort when the list is first opened.

/Create Record Type/new image 6

  • (A) In the navigation pane on the left, Grid is the highest level available. You can always click here to return to these settings.

  • (B) Under Columns, you can choose which columns to display and in which order. You can also add a new column here by clicking Add Column at the bottom of the column list.

  • (C) Here you can set some paging information, including how many Rows to Display Per Page, the Default Sort field, and whether the sort should be Ascending or Descending.

  • (D) Click Test at any time to refresh the grid preview. This resets sorting so you can preview how the grid will look when it's first loaded in Tempo.

For a full list of grid properties, see Grid-Style Record List.

Column-Level Settings

You can configure a number of settings related to a column, including its label, width, alignment, etc.

To edit a column’s settings, click on any column name in the navigation pane on the left, or click on its label in the Columns section of the Grid settings.

In the below screenshot, I’ve set the Label for column #4 to "Contact," and I made the column sortable by selecting PurchaserName from the Sort Field dropdown. When the user clicks the title of this column, it will sort by the values in the PurchaserName field.

If you don't set a Sort Field for a column, users won't be able to click on that column to sort it.

Component-Level Settings

Every column can have one component. If your column does not have a component yet, in the Component section, click Select Component, and choose the desired component type. To edit an existing component, simply click on the component’s name.

In the above screenshot, the component in this column is a text component with the Display Value of rf!PurchaserName.

At the component level, values must be called with the record field domain (rf!). Every field in your data source is available as a record field.

For a full list of available components, see Grid-Style Record List.

Create a Feed-Style Record List

A feed-style record list is vertical list of records that resembles a news feed. This is an alternative to the grid-style list in the previous section.

The feed-style list is created with the listViewItem function.

A feed-style record list cannot display more than 100 records. If the record set includes more than 100 records, and searching by record title won't help users find the records they're looking for, we recommend you Create User Filters, or consider a Grid-Style Record List.

To create a feed-style record list, from the Record List section, select Feed, then click Edit Record List.

This will display a form into which you can enter your list view function and choose a field to sort on.

You’ll notice that record values are called with the record field domain (rf!). Every field in your data source is available as a record field.

The listViewItem expression in the previous image results in a list that looks like this:

The first record in the above image has been color coded against the listViewItem function so you can see how the parameters display.

Many users find it helpful to create the list view in a separate expression rule and call that rule here.

In this example, the record image itself (in the image parameter) is called from a rule that returns an image for each record based on the record’s status. Below is the rule we used to choose the appropriate image.

fetchOrderIcon

load(
 local!status: choose(wherecontains(ri!status,cons!CASE_APP_OrderStatus),
    "EYE",
    "CLOCK",
    "WARNING",
    "PAPER_AIRPLANE",
    "TASK"
 	),
 local!color: choose(wherecontains(ri!status,cons!CASE_APP_OrderStatus),
    "BLUE",
    "GREY",
    "ORANGE",
    "GREEN",
    "GREEN"
  ),
    a!iconNewsEvent(local!status,local!color)
)

Add a Record List Action

A record list action is a link to a process model the user can start directly from the record list. It is common to configure this action for users to create a new record for that record type.

To create a record list action,

  1. Open your record type.
  2. From the Record List section, click New Action at the bottom of the Action grid. Create New Record List Action
  3. Enter the Display Name of the record list action. This name is displayed on the button that initiates the action.
  4. Enter the Description of the record list action. This description is displayed in a tooltip when hovering on the record list action button.
  5. Select the icon you wish to display with the action at the top of the record list in the Icon field. The default "plus" is a good choice when adding a new record.
  6. Select the process model you wish to use as a record list action in the Process Model field. Create New Record List Action
  7. To further restrict who can access the record list action, update the Visibility expression field. The action will only be visible when the expression evaluates to true for the user.
  8. Select the OK button to confirm the record list action setup and then save the record type.

Define a Default Filter

Default filters allow you to filter records before they are loaded in the record list. Records filtered this way are completely inaccessible to the user, and won't show up in searches or queries by that user. For more information about default filters and record type security, see Default Filters.

Each default filter defines a condition that must be true for a record to display in the list. If you have multiple conditions, the record must meet all conditions in order to display.

You can create a default filter using the following options:

  • By Field: Allows you to apply multiple default filters joined by an AND union.
  • Expression: Allows you to apply more complex filters by entering an expression containing a list of a!queryFilter() or a!queryLogicalExpression().

By Field

To create a default filter,

  1. Check the By Field radio button.
  2. In the Default Filters section, click on + New Default Filter. This will display the Create New Default Filter form.
    Screenshot
  3. Enter the record field to check in Field. You don't need to use the rf! prefix.

  4. Select the appropriate comparison from the Operator dropdown.

  5. Enter the value for the comparison in the Value field. This is an expression field, so encase text values in quotes.

    For example, the filter in the following screenshot removes all records with a status of Closed. Screenshot

  6. Click OK.

Expression

  1. Check the Expression radio button.
  2. In the expression editor, enter your expression containing a filter. For additional details, see Record Types.

Create User Filters

User filters, like default filters, allow you to define conditions that must be true for a record to display in the list. Unlike default filters, users filters are controlled by the user, and are available from the top of the record list.

Every user filter can have multiple options created for it, and you can have multiple user filters. User filters can be simple or dynamic.

You can create new user filters using the following options:

  • Simple: Allows you to define a static list of filter options by specifying a label, an operator, and a value for each filter option.
  • Dynamic: Allows you to use an expression to dynamically generate the filter's options. When using a dynamic user filter, Appian recommends defining the user filter expression in a rule for version control and testing purposes, and calling that rule in the User Filters field. For more information on creating dynamic user filters, see a!facet.

Note: expression-backed records cannot use simple user filters.

Create a Simple User Filter

  1. Click + New User Filter in the User Filters section. This displays the Create New User Filter form.

Screenshot

  1. Enter a name for the user filter in Filter Name. This is the name it will display within the record type, in the User Filters table.

  2. Enter the field you want to filter against in Filter Field. Note: you don't need to use the rf! domain here.

  3. Enter the name you want users to see in Filter Label.

Set User Filter Visibility

By default, user filters are visible to all users who can see the record type. If you want to restrict the visibility of a filter, click Only show when… from the Filter Visibility section. Doing so displays a field into which you can enter an expression.

The filter will display when the expression evaluates to true.

Create Filter Options

Now it's time to create some filter options. Each one of these will display under the filter dropdown at the top of the record list. When the user clicks on one of the options, it'll filter the records for all that match that condition. Multiple options can be selected at a time from a single user filter by default. To change the filter to only allow a single selection, uncheck the "Users can select multiple options" field. To create a new filter option,

  1. Click + New Filter Option.
    Screenshot

  2. Enter a name for the option in Option Label. This is the name users will see.

  3. Choose the appropriate condition from the Operator dropdown. This is how your chosen record field will be compared.

  4. Enter a value the condition must meet in Value. This is the value your record field will be compared against.

Set a Default User Filter Option

You can choose one of your options as the Default Filter Option, which means when a user first loads the record list, this option will already be selected. They can clear the option by clicking on it, if they want to choose another.

To choose a default option, select the Set default option checkbox. This will open the expression editor. Enter in an expression that evaluates to one of the option labels defined in the user filter.

Create a Dynamic User Filter

Instead of configuring a simple user filter, you can construct a dynamic user filter with an expression using the a!facet() function. For expression-backed records, this is the only option. However, you can use an expression to configure a user filter for process and entity-backed records as well.

For configuration information and examples, see the Dynamic User Filters page.


Define Record Views

A record view is an interface that allows you to display record information to users. These are defined in the Record View Details section, under Views, where you will find a tabular display of the record type's views.

If you do not have a record view created yet, we recommend creating your record views as separate interface objects, and then passing the record information to those interfaces when calling them from the record type. To learn more about this method of creating a record view, see Create a Record View.

At a minimum, all records must have the Summary view, which is the default view for a record.

Define the Summary View

The summary view is the first view a user sees when they click on a record from a feed-style record list. To define a summary view,

  1. In the Record View Details section under Views, click Summary.

    This will open the Edit View form.

  2. Enter an expression that calls your record view in the Interface field.

Add a Record View

You can add additional views to a record (up to a maximum of 20 additional record views).

To add another view to a record, open the record type and click + New View, under Record View Details.

This will open the Create New View form.

  1. Enter the name you want the user to see in the View Name field. This is an expression field, so encase text values in quotes.

  2. Enter your interface expression, or an expression that calls your interface, in the Interface field. For an example, see part three of Create a Record View.

  3. Enter an expression to set the visibility for the view in the Visibility field. The view will only be visibile when the expression evaluates to true for the user.

  4. From Related Action Shortcuts, select the related actions you want to display as buttons for this view. This section is blank if you haven't added any to the record type yet. The next section explains how to add related actions.


Related actions are links to process models the user can start directly from the record view with information about that record. We call that information the context for the related action. We recommend limiting related actions to processes relevant to the specific record from which they are started. To learn more about how related actions work from records, see Related Actions and Starting Processes From an Interface.

Related action process models are same as any other process model, except for a start-form restriction: if the process model has a start form, that form must be a SAIL form. This restriction doesn't apply to Quick Tasks.

Before you can add a related action to a record view, you must first add it to the record type. To do so,

  1. Open your record type.

  2. From the Related Actions section, click + New Related Action.
    Blank Create New Related Action

  3. Enter the Display Name of the related action.

  4. Enter the Description of the related action. If the display name is using the process model name, the description will automatically use the process model description.

  5. Select the icon you wish to display with the related action in the Related Actions list in the Icon field.

  6. Select the process model you wish to use as a related action in the Process Model field.

  7. Enter the values you want to send to the process model's parameters in the Context field. You need to use an expression that defines a dictionary, which must contain a field for the relevant process parameters and a value for those parameters. This allows you to start a new process with information relevant to the record the user is currently viewing.
    • Note: When you select a process model for a new related action, Appian pre-populates this field with all process parameters found in the selected process model, sets their values to null, and adds a comment with the data type for reference. Simply replace the null with the value you want to pass to the process parameter, as shown below. You do not need to include all parameters from the process model; only include the parameters you need for the related action, and remove the rest. If you make changes to the process parameters later, you'll need to manually update this field.

    Create New Related Action

  8. To further restrict who can access the related action, update the Visibility expression field.

  9. Select the "OK" button to confirm the related action setup and then save the record type.

Now that you've added you related action to the record type, it'll be visible from the Related Actions view of your records.

If you want the related action to show up as a button in the upper-right-hand corner of a record view, you'll need to go back to the Record View Details section and open the desired view.

From there, you should see your available related actions on the right under Related Action Shortcuts.

Simply check a box next to the ones you want to display on this view.

Related actions from Quick Tasks won't show up in this list.

Users will see selected related actions as buttons when they are on that particular record view. Different views can display different related actions.

In the below example, you can see our record type has two related actions available to add to the Summary view: Update Order Status and New Request.

Configuring Security for a Record Type

Within the record type designer, access the Security option in the Settings menu to define who will be able to see and/or edit your record type.

Record Type Visibility

By default, users and groups that are not system administrators or explicitly in the rolemap of a record type do not have access to see it. However, you can change the default security for a record type such that all users have Viewer privileges.

Record Type Access

There are three permission levels available related to record type access. In summary, they are:

  1. Viewers - Can see and open the record type and its security, but cannot make changes.
  2. Editors - Can see and open the record type, and can make changes to everything except security settings.
  3. Administrators - Can see and open the record type, and can make changes to all aspects of the record type.

For more detailed information about record type security, see Security.

FEEDBACK