11 Things you might not know in Appian


These findings are not recommended and strictly go against best practices as they are undocumented and can be removed by Appian in any new releases. This is just for educational purposes so you can understand how Appian works.
All these have been tried and tested and they work well till Appian 22.2

1. Index function can accept more than 3 parameters

The index function is used to get the data of a property from a list. Simply put, it is used to replace dot(.) notation. But the exciting part is, that the index function can actually accept more than 1 property at a time and can be used to access nested properties of a CDT, a Dictionary, or a Map. In case, any of the properties is not found, then the function directly jumps to the default value.

Both the codes will give us the exact same output but the one on the right is non documented way of using it. And it is possible that with future releases, Appian might change it.

2. if() function can accept more than 3 parameters

According to the documentation of if() function, it should accept 3 parameters i.e. condition, valueIfTrue, and valueIfFalse but in reality, it can accept more than 3 parameters where every odd parameter becomes a new condition and the total number of parameters should also be odd and more then 3.

3. Appian supports recursion with its rules and interfaces

Just like any other programming language, you can recursion on Appian also using its rules and interfaces. The implementation needs to be carefully done as there should be an exit condition while playing with recursion.

In the above image, we can see that the interface named ‘Recursion’ is being called inside itself with an exit condition that executes when the value of ri!value falls to 0

4. Entire interface definitions can be passed using ‘Any’ datatype inside an interface

While working with Appian interfaces, it is always advised to develop your interface in smaller parts and then combine when in a parent interface as Appian provides capabilities of calling an interface inside another. But did you know that you can use ‘Any’ type variable not just for passing values, but you can also pass the entire interface definition and similar complex pieces of codes via these variables.

5. Refresh variable configurations of child and parent rules go hand-in-hand

You must have built a query inside an expression rule at least once in your lifetime. If you configure your query in localVariables() and then use that Expression rule somewhere on an interface, then the refresh configurations done on the interface will have no impact on the query and its data until you add the same refresh configurations in your Query’s expression rule.

Here, the queryEntity() is called inside a variable with no refresh configurations and hence no matter what refresh configurations we apply while calling this expression rule, it will not work.

6. Card can be called inside a side-by-side layout

Everyone knows that cardLayout() cannot be called inside a sideBySideLayout() and we all wish it was possible. But there is a way on Appian with which we can achieve something similar. If you know a!recordActionField(), then chances are you already know this trick, but if you don’t, let me tell you. You can map recordActions on the interface using a!recordActionField() and the style of this action to “CARDS” so it can look like a card. This means if your card action can be mapped as a record action then you can get the look and feel of a card, that too inside a sideBySideLayout()

7. or(null) returns false | and(null) returns true

or() function is used to return ‘true’ if any of the conditions in it returns true. It means that this function will always search for the first ‘true’ evaluation and will keep checking its conditions until it finds that first true. As soon as it finds it’s first ‘true’ statement, it will not even check the rest of them. To prove this, you can try adding a rule name that does not even exist on the environment in or() function and it will not throw an error if it finds a true statement before that.

Image 1 – The first statement was true therefore the function did not bother to check the remaining statements.
Image 2 – The first statement was false and hence it moved to the second one only to identify that the rule does not exist.

and() function, on the other hand, checks for the first false statement and terminates after that. Just like the above experiment, if you pass an invalid rule in the and() function, it will only evaluate it if there were not any ‘false’ statements before that.

Coming back to the original point, when or() function searches for true, then anything that is not true is treated as false. Therefore when we try to evaluate or(null), then it returns false as for the function, null is not true, hence it returns false.

For and(), it searches for false and anything that is not false will be considered true. Therefore, and(null) returns true because null is not equal to false.

8. if() can be used as repeat() function

We all know that if() function’s first parameter should be a condition, but did you know that this can be more than one condition in a single parameter and if() will execute once for every condition and execute its relevant true or false block, hence, working like repeat() function but with more flexibility.

9. Square brackets can also be used to index a text property of a CDT/Dictionary/Map

10. reverse() function can also reverse complex list like interface components

reverse() function is used to reverse a list but because it is available in ‘Text functions’ category, most of us thought that it only works with the text inputs but the interesting part is that it can also reverse a list of variants (eg. list of UI elements)

11. We can also index an interface just like a usual list

While operating on a list on Appian, we use square brackets or index() function to index the list. Did you know that the same method can also be used to index the interface when the interface body has a list in its definition? Check it out below.

10 thoughts on “11 Things you might not know in Appian

Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Built with WordPress.com.

Up ↑

%d bloggers like this: