Exercise 8_ Interfaces
Exercise 8_ Interfaces
Exercise to Accompany
Interfaces 101
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].
Exercise 8: Interfaces
In this exercise, you will modify or create the following interfaces:
1. W#SA_VehicleSummary
2. W#SA_AddVehicle
3. W#SA_SupervisorForm
W#SA_AddVehicle is used to start the W#SA Add Vehicle process model to add a new
vehicle to the fleet.
To create efficient, intuitive, and attractive interfaces, it is important to follow UX design best
practices and recommendations. Visit the SAIL Design System in Appian Documentation to learn
more.
4. Click SAVE CHANGES to check for dependencies. One object requires a manual update.
1. Return to W#SA_VehicleSummary.
2. Double-click the Section Layout title, and delete the Vehicle text.
4. In the Components tab of the Palette, find the CARD layout. Drag and drop it above
vehicle details, outside of the section layout. It should span the full width of the
interface.
5. Drag and drop the Section Layout with the vehicle details into the Card Layout.
6. Delete the empty Column Layout below and the Column Layout for Event History. To
delete a component or field, click the component or field, and select Delete from the
dropdown menu.
● Delete the following fields: Last Maintenance Date, Modified On, Added By,
Image, and Modified By.
● On the canvas, delete Id from the Category Id, Condition Id, and Status Id
labels. Alternatively, you can remove the label in the Component
Configuration pane by deleting the text in Label.
● Click SAVE CHANGES.
8. Update the Category field. Currently, this field displays a numeric ID. You will use the
record type relationship to replace it with the user-friendly value in the associated lookup
table.
● Click Category.
● Under Display Value, click the expression.
● In the bracket, replace the record field with:
[recordType!W#SA
Vehicle.relationships.toCategoryRecord.fields.value]
9. Repeat this step with the Condition and Status fields. When selecting the relationship,
for Status, select toStatusRecord. For Condition, select toConditionRecord.
NOTE: You will see dashes as the values for these fields until you update test data in a
later step.
if(
a!isNullOrEmpty(
ri!vehicle[recordType!W#SA Vehicle.fields.image]
),
a!EXAMPLE_DOCUMENT_IMAGE(),
ri!vehicle[recordType!W#SA Vehicle.fields.image]
)
Like you configured the record list, this expression displays an example document image
if a vehicle has no image.
5. Click OK.
7. Click TEST to review the test data used to populate the interface.
rule!W#SA_QR_GetVehicleById(vehicleId: 1)
2. Click the Read-only Grid, and make the following changes in the Component
Configuration pane:
● For Data Source, select Record Type, and search for the W#SA
Maintenance record type.
● Click FILTER RECORDS. To display the maintenance requests for the selected
vehicle, filter the record based on vehicleId.
● In the Filter Records dialog, click Add Filter. For Field, select vehicleId. For
Condition, select =.
● For Value, change 123 to Expression.
● Click the null link. In the Expression Editor, enter:
ri!vehicle[recordType!W#SA Vehicle.fields.id]
● Click OK, then OK. You will see that the read-only grid now only displays the
maintenance requests that are associated with the vehicle record’s vehicle ID.
● At the bottom of the Component Configuration pane, click LAYOUT. Change
Label to Maintenance Requests.
NOTE: The Maintenance Requests grid is based on the current configuration of the
W#SA Maintenance record list. If you want, you can update the grid directly in this
interface. Updates to the grid in this interface will only be applied here.
4. In the Build view of your application, click the W#SA Vehicle record type. Next to the
record type name, click View Record List. Click on a VIN to view the updated
summary view interface.
2. In the Rule Inputs pane, click the record rule input. Configure the following
properties:
3. Click SAVE CHANGES to check for dependencies after changing the rule input name. A
manual change is required in the W#SA Add Vehicle process model. You will make this
change in the next exercise.
5. Delete the following text components: Status Id, Added By, Modified By, Condition Id,
Category Id, Image, and Modified On.
6. Remove the word date from the Last Maintenance and Next Maintenance field labels.
7. Drag and drop a SIDE BY SIDE layout inside of and at the top of the first column.
Move the Year, Make, and Model fields inside of the Side By Side layout. The Side By
NOTE: On mobile devices, columns layouts are flattened into a single column. If you
need certain fields to stay together, use side by side layouts.
8. Drag and drop a SIDE BY SIDE layout into the second column. Move the Added On,
Last Maintenance, and Next Maintenance fields inside of it.
9. Next, add a validation to the Next Maintenance field so that the next maintenance date
entered must be after the last maintenance date.
if(
todate(
ri!vehicle[recordType!W#SA
Vehicle.fields.nextMaintenanceDate]
) < todate(
ri!vehicle[recordType!W#SA
Vehicle.fields.lastMaintenanceDate]
),
“The next maintenance date must be after the last
maintenance date.”,
null()
)
This expression checks whether the next maintenance date is before the last
maintenance date. If it is, the field is invalid and displays an error message.
1. Drag and drop a FILE UPLOAD component into the second column. Change the Label
to Image.
1. Drag and drop two DROPDOWN components into the second column. Change the
Labels to Category and Condition.
2. For the Category dropdown, in the Component Configuration pane, select Record
Type for your Data Source.
3. Repeat step 2 for the Condition dropdown, using W#AA Vehicle Condition as the
record type.
4. Check that the dropdown selections display the correct choices. Click SAVE CHANGES.
1. Click the Added On field. In the Component Configuration pane, configure the
following properties:
● Display Value: Delete the text, and click the Edit as Expression icon. Enter
today() to return the current date.
● Select the Read-only checkbox.
2. Click the CREATE button. In the Component Configuration pane, configure the
following properties:
{
a!save(ri!vehicle[recordType!W#SA Vehicle.fields.addedOn],
today()), a!save(ri!vehicle[recordType!W#SA
Vehicle.fields.addedBy],loggedInUser())
}
Follow the steps below to create the supervisor approval form and configure the ˜rule inputs.
3. Click CREATE.
6. Click the cancel rule input, and configure the following properties:
2. Delete the top Section Layout. To delete it, click this section, then click the dropdown
arrow > Delete.
3. For the bottom section layout, delete the blue Section label.
4. Drag and drop three TEXT and two INTEGER input components into the first
column.
5. For the text fields, change the labels to Make, Model, VIN. For the integer fields,
change the labels to Year and Mileage. For each of these fields, make the following
changes in the Components Configuration pane:
6. Drag and drop an IMAGE component into the second column. Delete the label Image,
and click + in the Image field. Select DOCUMENT IMAGE.
● Click TEST, and enter the following expression into the vehicle row:
rule!W#SA_QR_GetVehicleByID(vehicleId: 1)
● Click SET AS DEFAULTS AND TEST. The interface will display the sample data.
10. In the Component Configuration pane, under Value, click false, and change it to
false. Under Save Value To, keep ri!approvalDecision.
12. Configure the Approve button to save values for the following fields: Modified By,
Modified On, and Status.
● In the Component Configuration pane, for Save Value To, click the Edit as
Expression icon.
● Enter the following expression:
{
a!save(ri!vehicle[recordType!W#SA
Vehicle.fields.modifiedBy], loggedInUser()),
a!save(ri!vehicle[recordType!W#SA
Vehicle.fields.modifiedOn], today()),
a!save(ri!vehicle[recordType!W#SA
Vehicle.fields.statusId], 1),
a!save(ri!approvalDecision, true())
}
6. In W#SA_VehicleDetailsView, in the top right corner, click the Gear icon > Properties.
7. Select the Include in the design library checkbox. Name the interface
W#SA_VehicleDetailsView.
9. Go to the W#SA_SupervisorForm. You will notice the reusable interface has been added
in place of the section layout and mapped to the appropriate rule input. Later, you will
be able to reference this reusable interface anytime you want to display read-only
vehicle details.
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 you are working to build in the Step-by-Steps, so you can use it as a reference
tool. Review this application to see how specific objects are configured, or test the app
to see how the features work from a business user’s perspective. You can find this app
in your Appian Community Edition workspace.
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.