0% found this document useful (0 votes)
600 views24 pages

24.4 Build An Application - Step-by-Step 5

This document outlines the fifth exercise in the Appian Step-by-Step series, focusing on designing record types for an application. It provides detailed instructions for creating and configuring vehicle and maintenance record types, including setting up fields, events, and user filters. The exercise is part of a broader learning path and emphasizes the importance of completing exercises in order for effective application development.

Uploaded by

pardusaly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
600 views24 pages

24.4 Build An Application - Step-by-Step 5

This document outlines the fifth exercise in the Appian Step-by-Step series, focusing on designing record types for an application. It provides detailed instructions for creating and configuring vehicle and maintenance record types, including setting up fields, events, and user filters. The exercise is part of a broader learning path and emphasizes the importance of completing exercises in order for effective application development.

Uploaded by

pardusaly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Build an Application:

Step-by-Step #5
Exercise to Accompany
Design Record Types: Model and Configure Your Data

The Appian Step-by-Step series consists of 12 exercises that accompany


the courses in the Appian Developer learning path. Exercises build upon
each other. Complete exercises in order and keep the app and all
objects until you are done with the project.

1 Welcome to the Appian Developer Learning Path

2 Create an Application

3 Manage Users and Groups

4 Expressions

5 Design Record Types

6 Sites

7 Query Your Data

8 Interfaces 101

9 Process Modeling 101: Part 1

10 Process Modeling 101: Part 2

11 Reports

12 Task Report

© Appian Corporation, 2024


Exercise 5: Design Record Types 3
Create the W#SA Vehicle Record Type 3
Create a Custom Record Field 5
Configure Vehicle Record Events 6
Configure the Record List 7
Edit Record List Columns 9
Add a User Filter 11
Generate the Summary View Interface 12
Configure a Dynamic Title 14
Create a Record Action 15
Create the W#SA Maintenance Record Type 16
Configure Maintenance Record Events 17
Generate the Maintenance Summary View Interface 18
Add Record Type Relationships 19
Use Record Type Relationships in Custom Record Fields 21
Add an Expression-Based User Filter 22
Troubleshooting Resources 24

Notice of Rights

This document was created by Appian Corporation, 7950 Jones Branch Dr, Tysons, Virginia 22102.
Copyright 2024 by Appian Corporation. All rights reserved. Information in this document is subject to
change. No part of this document may be reproduced or transmitted in any form by any means, without
prior written permission of Appian Corporation. For more information on obtaining permission for
reprints or excerpts, contact Appian Training at [email protected].

Appian Step-by-Step 24.4


© Appian Corporation, 2024 2
This exercise was developed for Appian 24.4. If Appian Community
Edition is on a later Appian version, functionality might be different.
Go to academy.appian.com to download the latest exercise.

Exercise 5: Design Record Types


In this exercise, you will create two record types and their associated views and actions so
business users can view information about the vehicle fleet and take action. You will complete
a few incremental steps to create your record types:

1. Create the W#SA Vehicle record type.


2. Configure vehicle record events.
3. Create a custom record field.
4. Configure the W#SA Vehicle record list.
5. Add a user filter to allow users to filter the fleet by the mileage category.
6. Create a summary view interface to display vehicle data.
7. Set this interface as the summary view for the W#SA Vehicle record type.
8. Create an action to add vehicles to the fleet.
9. Repeat these steps to create the W#SA Maintenance record type.

Create the W#SA Vehicle Record Type


Follow the steps below to create the W#SA Vehicle record type.

1. In the Build view of your application, click NEW > Record Type.

2. In the Create Record Type dialog, configure the following properties:

● Name: Enter W#SA Vehicle.


● Plural Name: Enter W#SA Vehicles. The plural name is what business users
see on their sites, so the name should make sense to them. Note that
application prefixes are not typically used for this field. In this exercise, you are
using a prefix because a Vehicle record type already exists in the Acme
Automobile Reference Application (AA).
● Description: Enter The list of vehicles managed by the W#SA
application.

3. Click CREATE.

4. In the Review Record Type Security dialog, click SAVE. You will use the default
security, which should have W#SA Users as Viewers and W#SA Administrators as
Administrators.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 3
Next, configure the data source.

1. In the record type, click TELL US ABOUT YOUR DATA.

2. In the Configure Data Source dialog, ensure that Database is selected. Click NEXT.

3. Ensure Build Apps Faster with Data Fabric is selected. Click NEXT.

4. Under Choose Database Table, find and select AS_VEHICLE. Click NEXT.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 4
5. Under Configure Sync Filters, click NEXT. You will not create sync filters in this
exercise.

6. Preview the fields, and click FINISH.

7. Click SAVE CHANGES to save the record type before you build additional features.

8. Next to the record type name, click View Record List to view the record type from the
business user perspective.

Tip: Use Record-Level Security to Configure Your Record Security


Requirements

● You might have strict guidelines around who can see what data. With
record-level security, you can configure who can see which rows of your
record data.
● By default, any user with Viewer permission on the record type can see all
available records.
● To configure security rules, click Record-Level Security in the left menu.
● For this exercise, you do not need to configure record-level security.

Create a Custom Record Field


Before you configure the record list, you will first create a custom record field to display the
vehicle mileage category: Low Mileage, Medium Mileage, or High Mileage. Follow the steps
below to create a custom record field.

1. On the Data Model page, click NEW CUSTOM RECORD FIELD.

2. Under Select a Template, select Groups Based on a Range. Click NEXT.

3. In the Configure Values section, under Create Groups From, select mileage.

4. Change Number of Groups to 3.

5. Under Custom Field Value, configure the group names and values:

● Name Group 1 Low Mileage, and set Upper Limit 1 to 50,000.


● Name Group 2 Medium Mileage, and set Upper Limit 2 to 150,000.
● Name Group 3 High Mileage.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 5
6. Click TEST to preview the custom record field.

7. Click NEXT.

8. Under Field Properties, change Record Field Name to mileageCategory.

9. Click CREATE, then SAVE CHANGES. Saving your changes syncs the vehicle data in
Appian. Wait until the sync completes to start the next steps; go to the Sync History
page to check the status of the sync.

Configure Vehicle Record Events


Follow these steps to configure record events for the W#SA Vehicle record type.

1. In the left menu, go to the Events page.

2. Click GENERATE EVENT RECORD TYPES.

3. In the Generate Event Record Types dialog, include common event types by leaving
the Created Vehicle, Updated Vehicle, and Commented on Vehicle checkbox
selected.

4. Keep the default record type names for Event History, Event Type Lookup, Reply
Thread, and Subscriber.

5. Uncheck Download database script.

6. Click GENERATE.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 6
Configure the Record List
Next, you will edit the record list to display the following columns: Vehicle VIN, Make, Model,
Year, Next Maintenance Date, Status, Added By, and Image. You will sort the list by the vehicle
make, condition, category, and status. You will also add a clickable link to the vehicle VIN.
Later, you will connect this link to a summary interface for each vehicle.

Follow the steps below to configure the record list.

1. In the left menu, go to the List page.

2. Click EDIT LIST.

3. In the Edit Record List dialog, delete fields that do not need to be shown in the record
list. To delete fields, click the in-line X next to those fields. Delete the following fields:
Id, Color, Condition Id, Status Id, Category Id, Mileage, Last Maintenance Date, Added
On, Modified By, Modified On. You should be left with: Make, Model, Year, VIN, Next
Maintenance Date, Image, and Added By.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 7
4. Move the Vin column up so that it is the first column in the grid. Click the in-line arrow
to move this column.

5. Add a new column for the mileage category. Click ADD COLUMN, and click the new
Grid Column link to drill into the column.

6. Configure the following properties:

● Label: Change the label to Mileage Category.


● Sort Field: Select mileageCategory.
● Display Value: Select mileageCategory.

7. Return to the grid-level settings, and move the Image column so that it is the last
column in the grid. Use the in-line arrow to move this column.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 8
8. Click OK, then SAVE CHANGES.

Edit Record List Columns


Now that you have the columns you need for your record list, you will edit them. Follow the
steps below to transform the VIN field into a clickable link.

1. Click EDIT LIST.

2. In the left pane, under Columns, click Vin.

3. Change the Label to VIN.

4. Under Display Value, click DISPLAY OPTIONS.

5. In the Display Options dialog, select RECORD LINK.

6. Under Display Value, click Link.

7. Under Links, click List of Links.

8. Click Record Link (Record Link).

9. Next to Label, click the Edit as Expression icon.

● In the Expression Editor, delete the text.


● Enter fv!, and select row.
● Add a square bracket [, and start entering vin. Select vin when it appears.
● Your expression will look like this:

fv!row[W#SA Vehicle.vin]

● Click OK.

10. In the Record Link section, under Record Type, enter and select W#SA Vehicle.

11. In the Record Link section, next to Identifier, click the Edit as Expression icon. In the
Expression Editor:

● Delete the text.


● Enter fv!, and select identifier.
● Click OK.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 9
Your configurations will look like the image below:

Follow the steps below to remove the link from the Make column.

1. In the left pane, under Columns, click Make.

2. Under Display Value, click Clear to remove the link.

3. From the dropdown that appears, select make.

Follow the steps below to format the Added By column.

1. In the left pane, under Columns, click Added By.

2. Next to Display Value, click the Edit as Expression icon. You will call the expression
rule you created in Exercise 4.

● In the Expression Editor, delete the text, and enter the following expression:

rule!W#SA_FormatDisplayName(user:fv!row[recordType!W#SA
Vehicle.fields.addedBy])

rule! is a type of domain prefix. Use rule! to indirectly reference a business


rule, like an expression rule or interface. fv!row is a grid-based function. This
function refers to the rows, while the field inside the bracket refers to the
column. The row and column intersect to output the cell.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 10
● Click OK. Notice how the names in the Added By column are now formatted
correctly.

Follow the steps below to format the Image column.

1. Under Columns, click Image.

2. Under Display Value, click DISPLAY OPTIONS.

3. Select DOCUMENT IMAGE.

4. Under Display Value, click Image.

5. Under Images, click Document Image.

6. Under Document, click the a!EXAMPLE_DOCUMENT_IMAGE() to edit as expression.

● In the Expression Editor, delete all text, and enter the following expression:

if(
a!isNullOrEmpty(
fv!row[recordType!W#SA Vehicle.fields.image]
),
a!EXAMPLE_DOCUMENT_IMAGE(),
fv!row[recordType!W#SA Vehicle.fields.image]
)

This expression checks whether the image field is null. If it is null, it displays an
example document image. The example document image is displayed for
existing vehicle data; you will be able to upload vehicle images when you add
new vehicles to the fleet in later exercises.

● Click OK.

Add a User Filter


Next, you will add a user filter to the record list so business users can filter for vehicles by
mileage category. Follow the steps below to create this user filter.

1. In the left menu, go to the Filters page.

2. In the User Filters section, click New User Filter.

3. Configure the following properties:

● Name: Enter Mileage Category.


● Label: Enter “Mileage Category”. Use quotation marks because it is an
expression.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 11
● Field: Select mileageCategory.
● Under List Configurations, click New Option.

○ Option Label: Enter “Low Mileage”.


○ Value: Enter “Low Mileage”.
○ Scroll down, and in the Operator field, leave the = option.
○ Click SAVE FILTER OPTION.

● In the same manner, create the Medium Mileage and High Mileage options.

4. Click OK, then SAVE CHANGES.

5. Next to the record type name, click View Record List to test your user filter.

Generate the Summary View Interface


In this section, you will create the interface to display the vehicle summary information. Later,
you will configure the record list so business users can click the VIN to access the summary
view.

Follow the steps below to create the summary interface.

1. In the left menu, go to the Views page.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 12
2. Click GENERATE RECORD VIEW.

3. Select Vehicles, then click NEXT. Leave Subscribers unselected.

4. Keep the View Name as Summary, then click NEXT.

5. Under Security and Organization, click the Edit icon next to the W#SA Rules &
Constants folder. Replace this folder with the existing folder W#SA Interfaces.

6. Click GENERATE VIEW, then CLOSE. Click SAVE CHANGES.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 13
Configure a Dynamic Title

In a later exercise, you will update the interface generated in the last step,
W#SA_VehicleSummary. For now, you will use an expression that displays the year, make, and
model of the vehicle being viewed to appear as the title of a vehicle’s summary view.

1. In the left menu, go to the Views page.

2. Under Header, under Configurations: Record Title, select Expression.

3. In the Expression Editor, delete the text, and enter the following expression:

rv!record[recordType!W#SA Vehicle.fields.year] & " " &


rv!record[recordType!W#SA Vehicle.fields.make] & " " &
rv!record[recordType!W#SA Vehicle.fields.model]

The rv! domain allows you to reference a record's identifier (ID) or a value within a
record field.

4. Click SAVE CHANGES.

5. Preview the vehicle summary view with the new dynamic title.

● Next to the record type name, click View Record List.


● Select any vehicle to access its summary view. Your summary view should now
display a dynamically generated title.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 14
Create a Record Action
In this exercise, you will create a record action that will allow registrars and supervisors to add
a new vehicle to the fleet. They will be able to click a button on the record list to fill out a
form.

Follow the steps below to create a record action.

1. In the left menu, go to Actions.

2. Click GENERATE RECORD ACTIONS.

3. In the Choose Your Action dialog, deselect Update and Delete. For this exercise, you
will focus on the Create record action. Click CUSTOMIZE.

4. Configure the following properties:

● Display Name: Enter Add Vehicle.


● Description: Enter Action for adding a new vehicle to the fleet.
● Click NEXT: REVIEW OBJECTS.

5. Review the objects that Appian generates for this action, including a process model
and interface for adding a new vehicle. Click the Edit icon next to the objects to make
the following changes:

● Rename the interface W#SA_CreateVehicle to W#SA_AddVehicleForm.


● Rename the process model W#SA Create Vehicle to W#SA Add Vehicle.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 15
6. Click GENERATE.

7. Next to the record type name, click View Record List to preview the new Add Vehicle
record action.

Create the W#SA Maintenance Record Type


Next, you will create a second record type for the vehicle maintenance requests. Follow the
steps below to create the W#SA Maintenance record type.

1. In the Build view of your application, click New > Record Type.

2. In the Create Record Type dialog, configure the following properties:

● Name: Enter W#SA Maintenance.


● Plural Name: Enter W#SA Maintenance Requests.
● Description: Enter The list of maintenance requests for vehicles
managed by the W#SA application.

3. Click CREATE.

4. In the Review Record Type Security dialog, click SAVE.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 16
5. In the record type, click TELL US ABOUT YOUR DATA.

6. In the Configure Data Source dialog, ensure that Database is selected, and click
NEXT.

7. Ensure Build Apps Faster with Data Fabric is selected. Click NEXT.

8. Under Choose Database Table, find and select AS_MAINTENANCE. Click NEXT.

9. Click NEXT. You will not create sync filters for this exercise.

10. Preview the fields, and click FINISH.

11. Click SAVE CHANGES.

Configure Maintenance Record Events


Finally, you will generate the requested, started, and completed events from the W#SA
Maintenance record type.

1. In the left menu, go to the Events page.

2. Click GENERATE EVENT RECORD TYPES.

3. In the Generate Event Record Types dialog, deselect the Created Maintenance,
Updated Maintenance, and Commented on Maintenance checkbox.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 17
4. In the Other Event Types input, add the following list:

● Requested Maintenance
● Started Maintenance
● Completed Maintenance

NOTE: You can use the default "Created", "Updated" and “Commented on” events by
leaving their checkboxes selected.

5. Keep the default record type names for Event History, Event Type Lookup, Reply
Thread, and Subscriber.

6. Uncheck Download database script.

7. Click GENERATE.

Generate the Maintenance Summary View Interface


In this section, you will create the interface to display the vehicle maintenance summary
information.

1. In the left menu, go to the Views page.

2. Click GENERATE RECORD VIEW.

3. Ensure Maintenance is selected, then click NEXT. Leave Subscribers unselected.

4. Keep the View Name as Summary, then click NEXT.

5. Next to W#SA Rules & Constants folder, click the Edit icon. Replace this folder with
W#SA Interfaces.

6. Click GENERATE VIEW, then CLOSE. Click SAVE CHANGES.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 18
In this exercise, you do not need to configure this record type further. For more practice, try
customizing the record list, adding user filters, updating the summary view, and adding a
record title.

Add Record Type Relationships


In this exercise, you will add relationships to the W#SA Vehicle record type. Once you build
record type relationships, you will be able to easily access data from related records without
queries.

You will add four relationships to the W#SA Vehicle record type: Maintenance, Category,
Status, and Condition. You will use the existing Category, Status, and Condition record types
from the Acme Automobile Reference Application (W#AA).

The Category, Status, and Condition record types are reference, or lookup, tables that contain
the unique vehicle category, status, and condition values. A reference table contains set,
categorical data, which are often used as static dropdown values. Think of it as a “cumulative
list” that uses an identifier, or ID number, (1) to look up a value, such as vehicle category
(sedan).

Follow the steps below to add the W#SA Maintenance record type relationship.

1. Open the W#SA Vehicle record type, and click ADD RELATIONSHIP.

2. In Related Record Type, enter and select W#SA Maintenance. Click NEXT.

3. Configure the following properties:

● Relationship Name: Enter toMaintenanceRecord.


● Relationship Type: Select One to Many. Use One to Many because one vehicle
record can be related to multiple maintenance records.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 19
● Common Fields: For the W#SA Vehicle field, select id. For the W#SA
Maintenance field, select vehicleId.

4. Click ADD, then SAVE CHANGES.

Follow the steps below to add three more relationships to the W#SA Vehicle record type.

1. Under RELATIONSHIPS, click ADD RELATIONSHIP.

2. In Related Record Type, enter and select W#AA Vehicle Category. Click NEXT.

3. Configure the following properties:

● Relationship Name: Enter toCategoryRecord.


● Relationship Type: Select Many to One. Use Many to One because many
vehicles can have the same category, like sedan.
● Common Fields: For W#SA Vehicle, select categoryId. For W#AA Vehicle
Category, select id.

4. Click ADD, then SAVE CHANGES.

5. Follow steps 1–4 to add two more relationships to the W#SA Vehicle record type:
W#AA Vehicle Status and W#AA Vehicle Condition. Use the following
configurations:

● Relationship Type: Select Many to One for both relationships.


● Common Fields: For the W#AA Vehicle Status relationship, select statusId as
the W#SA Vehicle field. For the W#AA Vehicle Condition relationship, select
conditionId as the W#SA Vehicle field.
Appian Step-by-Step 24.4
© Appian Corporation, 2024 20
6. Update the user filter labels. Appian automatically creates user filters for Many to One
record type relationships based on the relationship names.

● Go to the Filters page. For each of the W#AA Vehicle Category, W#AA Vehicle
Status, and W#AA Condition user filters:
○ Next to the filter name, click the Edit icon.
○ Change Label to “Category”, “Status”, or “Condition” as
applicable.

○ Click OK.

7. Click SAVE CHANGES.

8. Next to the record type name, click View Record List to view and test these filters.

Use Record Type Relationships in Custom Record Fields


Record type relationships are useful when you want to aggregate and display data from a
related record type. In this exercise, you will create two custom record fields that aggregate
maintenance-related data: the total cost of all maintenance per vehicle and the total count of
all maintenance requests per vehicle.

Follow the steps below to create two custom record fields.

1. In the Data Model page, click NEW CUSTOM RECORD FIELD.

2. Select Aggregate Related Record Fields. Click NEXT.

3. In Field, select toMaintenanceRecord.cost.

4. In Aggregation Function, select Sum of.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 21
5. Click TEST to preview the new field, and click NEXT.

6. Leave the name costSum, and click CREATE.

7. Follow steps 1–6 to create a custom record field that displays a count of all
maintenance requests for a vehicle. Use the following configurations:

● Field: Select toMaintenanceRecord.id.


● Aggregation Function: Select Count of.
● Record Field Name: Enter countOfMaintenanceRequests.

8. Click SAVE CHANGES.

Add an Expression-Based User Filter


In this exercise, you will create an expression-based user filter to filter the W#SA Vehicle
record type by vehicle make.

Follow the steps below to create an expression-based user filter.

1. In the W#SA Vehicle record type, go to the Filters page.

2. Click New User Filter.

3. Select Expression.

4. In Name, enter Make.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 22
5. In Filter Expression, enter the expression below. This expression should be typed. If
you copy and paste it, you will need to edit the lines with recordType.

a!localVariables(
local!vehicleMakes: a!queryRecordType(
recordType: recordType!W#SA Vehicle,
fields: a!aggregationFields(
groupings: {
a!grouping(
field: recordType!W#SA Vehicle.make,
alias: "make"
)
},
measures: {
a!measure(
field: recordType!W#SA Vehicle.make,
function: "COUNT",
alias: "count"
)
}
),
pagingInfo: a!pagingInfo(
startIndex: 1,

batchSize: 5000
)
),
a!recordFilterList(
name: "Make",
options: a!forEach(
items: local!vehicleMakes.data,
expression: a!recordFilterListOption(
id: fv!index,
name: fv!item.make,
filter: a!queryFilter(
field: recordType!W#SA Vehicle.make,
operator: "=",
value: fv!item.make
),
dataCount: fv!item.count
)
)
)
)

First, this expression creates a local variable for the record type query, so that it can be
referenced later in the expression. In this case, a!queryRecordType() executes a

Appian Step-by-Step 24.4


© Appian Corporation, 2024 23
query on the W#SA Vehicle record type and returns the vehicle makes. Instead of
manually creating an option for each make, the a!forEach() function writes these
options for you. It takes the array of vehicle makes returned in the query and passes
them to an expression one at a time, creating the a!recordFilterListOption
function for each item in the array.

6. Click OK, and then SAVE CHANGES.

7. Next to the record type name, click VIEW RECORD LIST. At the top of the record list,
you will see the Make filter. Test that it works as expected.

Tip: Use Local Variables to Define and Store Temporary Values

● Local variables define and store temporary values within an expression.


Use them when you only need values within a particular expression. For
example, if you need to temporarily store user-inputted search terms in
an interface, you can add a local variable, such as local!search.
● A local variable temporarily holds a value until you save it. For example, in
an interface you can save a local variable using the relevant rule input.
● Use the following syntax to define a local variable:
a!localVariables(localVar1, localVarN, expression).
LocalVarN means that you can have multiple local variables.

Troubleshooting Resources
Stuck on a step, or need help troubleshooting? Appian provides several support resources
that you can use as you build:

1. Acme Auto Solution Application - The Acme Auto Solution Application (AS) is the
solution to the exercises you are following in the Step-by-Steps. You can use the AS
application as a reference tool. Review it to see how specific objects are configured, or
test the application to see how the features work from a business user’s perspective.
This application is preloaded into your workspace. If you do not see it in the list of
applications in your workspace, you can deploy it from the App Catalog. Refer to Build
an Application: Step-by-Step #1 for more information on how to use the App
Catalog.

2. Community Discussions for New Users - Check out the New to Appian thread in
Community. Join our community of experts to ask questions and find answers from
past discussions.

3. Appian Documentation - Appian’s product documentation will provide you with an


overview of key Appian features, newest release information, additional tutorials, and
helpful patterns and recipes to implement in your app.

Appian Step-by-Step 24.4


© Appian Corporation, 2024 24

You might also like