Master Most Common Appian Functions
One function at a time. Each lesson explains how the function actually behaves, lets you run it in the browser, and finishes with exercises you clear in order.
Making decisions
if()
Return one of two values based on a condition. The first function in almost every Appian expression, and the one whose list behaviour catches people out.
Start0 of 5 exercises0%a!match()
Choose a result by matching one value against a list of conditions. The flat replacement for nested if(), where the first match wins and the order of ranges decides the answer.
Start0 of 5 exercises0%and(), or(), not()
Appian's logical functions in one place: and(), or() and not(), how they treat lists, nulls and short-circuiting, and how to combine them into XOR, NAND and NOR, which Appian has no function for.
Start0 of 7 exercises0%a!isBetween()
The range check used in validations. Both limits are outside the range, the parameters run upper before lower, and a backwards range is an error rather than a false.
Start0 of 4 exercises0%
Text
split()
Cut text into a list on a separator. Simple until the data has a trailing comma, and then the blank pieces it leaves behind are the whole story.
Start0 of 5 exercises0%text()
Format numbers and dates as text: money, percentages, phone numbers, written-out dates and times. Extra decimals are cut off rather than rounded, which is the part that catches people.
Start0 of 7 exercises0%
Looping
a!forEach()
Run an expression once per item and collect the results. The function people reach for too early, because Appian already applies most things across a whole list on its own.
Start0 of 5 exercises0%enumerate()
Make a list of counting numbers when you have no list to loop over. Starts at 0, which is one less than every other position in Appian.
Start0 of 5 exercises0%
Finding and filtering
index()
Read an item by position or a field by name, with a value to fall back on. Given a list of records it returns that field from every one of them, which is the trick most people miss.
Start0 of 5 exercises0%where()
Find the positions in a list where a condition is true. Paired with index() it is how filtering is written in Appian, and it handles the comparisons reject() cannot.
Start0 of 5 exercises0%wherecontains()
Find the positions where a value appears in a list. Takes the value first, matches case-sensitively, and finds nulls that where() cannot.
Start0 of 5 exercises0%reject()
Remove the items of a list that pass a test. Takes a function reference rather than a condition, which is the part that catches people out.
Start0 of 5 exercises0%
Records and variables
a!localVariables()
Name a value so you can use it more than once, and reach a value from an outer loop. The last argument is the answer, which is the part people miss.
Start0 of 5 exercises0%a!map()
Build a record with named fields. The shape almost all real Appian data arrives in, and the one thing you must not compare with an equals sign.
Start0 of 5 exercises0%a!update()
Change part of a list or a record and get back a copy. Handles several changes at once, and stretches the list with nulls if you aim past the end.
Start0 of 5 exercises0%