Incorporate Looping Functions Exercise
Incorporate Looping Functions Exercise
Exercise
Advanced Expressions
Introduction 2
How to Complete the Exercises in this Tutorial 2
How Can I Practice? 2
Appian Version 2
Naming Conventions 2
Save Often 3
Additional Resources 3
Practice 1 Set Up: Looping Functions 4
Practice 1 Help and Resources: Looping Functions 6
Scenario 1 6
Scenario 2 7
Scenario 3 8
Additional Resources 8
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
Introduction
How to Complete the Exercises in this Tutorial
Follow the steps to complete practice 1.
Keep in mind that this is a community environment not suitable for production workloads or
sensitive information.
Appian Version
Appian Community Edition is on the latest Appian version. If you are following the exercises
from a previous Appian version, go to academy.appian.com to download the latest version.
Naming Conventions
When you register for Appian Community Edition, you gain access to a workspace, which is
your personal area within the community environment. When your workspace has been
assigned, you will receive a confirmation email with a workspace ID.
Use this workspace ID when creating new applications and objects. Otherwise, you could run
into naming conflicts with objects created by other users. Pre-loaded apps in your workspace
also include the workspace ID. In the example below, the application prefix for the Acme
Auto Solution app is W0000AS. So, the workspace identifier is W0000, which would be
included in any new app’s prefix.
24.3
Additional Resources
Appian provides a number of training resources for Appian developers. The following
resources are particularly popular with our learners:
● Academy Online - Appian’s online courses provide useful survey courses, step-by-step
tutorials, and practice exercises. Explore these resources at your own pace. Survey
courses will help you develop a better grasp of the topics you need to learn. Video
and print tutorials will help you with getting hands-on experience with Appian.
● 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.
24.3
a!localVariables(
local!sensor:
a!map(data: {125,92,22,63,73,28,19}),
a!map(data: {35,65,92,22,63,73,28}),
a!map(data: {2,35,65,22,63,73,18,29}),
a!map(data: {9,35,65,63,35,28,19})
},
local!arrayOne: {125,35,65,92,22,63,73,28,19},
local!arrayTwo: {1,74,33,null,92,null,33,null,85},
/* Scenario 1 */
/* Scenario 2 */
/* Scenario 3 */
3. Scenario 1 - In the space provided under the comments, write an expression that uses
the forEach() looping function to iterate through local!sensor. The expression should
calculate and return the average values for the items in each array.
24.3
4. Scenario 2 - In the space provided under the comments, write an expression that uses
a looping function to to remove any null values found in local!arrayTwo.
● When you're done with scenario 2, comment out the expression you wrote.
5. Scenario 3 - In the space provided under the comments, write an expression that uses
a looping function to merge the values in local!arrayOne and local!arrayTwo and
returns the remaining values as a single array.
Hint
Use the a!flatten() function to convert the final output to a single list.
24.3
Scenario 1
1. Use a!forEach()
2. For items, enter: local!sensor
3. For expression, enter: average(fv!item.data)
24.3
24.3
Additional Resources
● All Functions
○ a!forEach()
○ reject()
○ a!flatten()
○ merge()
24.3