What is difference between a! and fn! ?

?

  Discussion posts and replies are publicly visible

  • +1
    Certified Senior Developer
    Appian functions are divided into two namespaces: "a" and "fn." All plugin functions are in the "fn" namespace, and all functions in the "a" namespace are Appian-native functions. However, some Appian-native functions are also in the "fn" namespace. Some of the a! functions are available as smart services that we can use in process models.
  • Hi tirumalar,

    AFAIK ,There are two function domain prefixes in Appian: fn! and a!. a! is used to call various system, smart service, and connector functions as well as interface components. While a! should always be used to call one of these functions or components, fn! does not need to be.

    Thanks,
    ravalik
  • 0
    Certified Lead Developer

    Hi  there are few differences between a! and fn! as mentioned below:

    1. You can access Custom Plugin expression function using fn! whereas you cannot do the same by using a! e.g: fn!isusernametaken(....)
    2. You can access Boolean literal functions such as true(), false() using fn! whereas you cannot do the same by using a! e.g: fn!true()
    3. Interface/SAIL component can be invoked using a! where as cannot be invoked using fn! e.g: a!textField()
    4. Any function defined without Bang(!) notation in your expression, will be considered as fn! internally whereas you need to explicitly mention a! to define a component.

    NOTE: As per my understanding, you cannot invoke several functions using a! e.g: a!tostring(1) will throw an error whereas fn!tostring(1) (OR) tostring(1) will work as expected.

    Hope this will help.