24.4 Build An Application - Step-by-Step 4
24.4 Build An Application - Step-by-Step 4
Step-by-Step #4
Exercise to Accompany
Expressions: Transform 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].
Exercise 4: Expressions
In this exercise, you will create two types of rule objects: six constants and one expression
rule.
Create Constants
A constant is a literal value that can be called from any expression, across objects in your
application. In this section, you will create constants that point to the groups and folders you
just created.
1. From within the W#SA Constants folder, click NEW > Constant.
3. Click CREATE.
4. Follow steps 1–3 to create constants for the remaining four groups:
● W#SA Users
● W#SA Supervisors
● W#SA Registrars
● W#SA Mechanics
Next, you will create a constant that points to the W#SA Documents folder.
3. Click CREATE.
1. From within the W#SA Expressions folder, click NEW > Expression Rule.
3. Click CREATE.
4. In the Rule Inputs pane, click the New Rule Input icon.
a!match(
value: ri!user,
whenTrue: isnull(fv!value),
then: "",
whenTrue: isusernametaken(fv!value),
then: proper(
user(fv!value, "firstName") & " " & user(fv!value,
"lastName")
),
default: proper(joinarray(split(fv!value, "."), " "))
)
a!match evaluates a value against multiple conditions and returns a value based
on a match. If no match is found, the default is returned.
● First, this expression checks whether the user’s username is null. If the
user’s username is null, an empty string is returned.
● If the user’s username is not null, then the expression checks whether the
user is an active user. If the user is active, the first and last name associated
with the username is returned.
● If the username is not null and the user is not active, the default is
returned.
● The process for formatting users and non-users is different. The last line in
the expression reformats the username input as First and Last Name for a
non-user.
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.