24.4 Build An Application - Step-by-Step 5
24.4 Build An Application - Step-by-Step 5
Step-by-Step #5
Exercise to Accompany
Design Record Types: Model and Configure Your Data
2 Create an Application
4 Expressions
6 Sites
8 Interfaces 101
11 Reports
12 Task Report
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].
1. In the Build view of your application, click NEW > Record Type.
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.
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.
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.
● 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.
3. In the Configure Values section, under Create Groups From, select mileage.
5. Under Custom Field Value, configure the group names and values:
7. Click NEXT.
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.
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.
6. Click GENERATE.
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.
5. Add a new column for the mileage category. Click ADD COLUMN, and click the new
Grid Column link to drill into the column.
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.
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:
Follow the steps below to remove the link from the Make column.
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])
● 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.
● In the same manner, create the Medium Mileage and High Mileage options.
5. Next to the record type name, click View Record List to test your user filter.
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.
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.
3. In the Expression Editor, delete the text, and enter the following expression:
The rv! domain allows you to reference a record's identifier (ID) or a value within a
record field.
5. Preview the vehicle summary view with the new dynamic title.
3. In the Choose Your Action dialog, deselect Update and Delete. For this exercise, you
will focus on the Create record action. Click CUSTOMIZE.
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:
7. Next to the record type name, click View Record List to preview the new Add Vehicle
record action.
1. In the Build view of your application, click New > Record Type.
3. Click CREATE.
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.
3. In the Generate Event Record Types dialog, deselect the Created Maintenance,
Updated Maintenance, and Commented on Maintenance checkbox.
● 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.
7. Click GENERATE.
5. Next to W#SA Rules & Constants folder, click the Edit icon. Replace this folder with
W#SA Interfaces.
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.
Follow the steps below to add three more relationships to the W#SA Vehicle record type.
2. In Related Record Type, enter and select W#AA Vehicle Category. Click NEXT.
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:
● 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.
8. Next to the record type name, click View Record List to view and test these filters.
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:
3. Select Expression.
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
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.
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.