Use Array Functions Exercise
Use Array Functions 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: Insert, Remove, and Append Arrays 4
Practice 1 Help and Resources: Insert, Remove, and Append Arrays 5
Write an expression to remove “yellow” from the array 5
Insert the value “purple” between “red” and “yellow” in the original array 5
Add two arrays to the original array (option 1) 6
Add two arrays to the original array (option 2) 6
Additional Resources 7
Practice 2 Set Up: Flatten Arrays 7
Practice 2 Help and Resources: Flatten Arrays 8
Flatten Arrays 8
Additional Resources 8
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].
Introduction
How to Complete the Exercises in this Tutorial
Follow the steps to complete practice 1 and 2.
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
Help
For each of the exercises below, use one of the following functions: insert(),
append(), remove(), or a!update()
● After editing the expression, click Test Rule to verify the results are correct:
{"red", "blue"}
5. Now replace the current expression with a function that inserts the value “purple”
between “red” and “yellow” in the original array.
● After editing the expression, click Test Rule to verify the results are correct:
{"red", "purple", "yellow", "blue"}
6. Now for the third exercise, replace the current expression with a function that adds
the following two arrays to the original array: {“green”, “purple”}, {“orange”, “gold”}
● After editing the expression, click Test Rule to verify the results are correct:
{"red", "yellow", "blue", "green", "purple", "orange", "gold"}
24.3
Insert the value “purple” between “red” and “yellow” in the original
array
1. Use the insert function
2. Add array: { "red", "yellow", "blue" }
3. Add "purple" as the value to insert
4. Add 2 as the index
24.3
24.3
■ Use the Format icon to make the expression easier to work with
24.3
Flatten Arrays
1. Collapse the a!forEach() function
2. Add the a!flatten() function around a!forEach
Additional Resources
● All functions documentation
○ flatten()
24.3