Free cookie consent management tool by TermsFeed

Event Consumer Object

On This Page
The capabilities described on this page are included in Appian's advanced and premium capability tiers. Usage limits may apply.

The event consumer object connects your Appian applications to Apache Kafka topics, allowing you to filter incoming events and take action on each one.

What is an event consumer?

An event consumer is a design object that listens to a Kafka topic, filters the events coming from that topic, and triggers an action for each matching event. The event consumer connects to a Kafka cluster through an Apache Kafka connected system and can start a process model or write records for each event it receives. With a consumer, you can connect the process models you've already built to activity happening across your enterprise.

The following diagram shows how Kafka events flow from the topic into Appian:

Diagram showing how Kafka events flow from the topic into Appian

When to use this object

Use an event consumer when you need to:

  • Consume events from a Kafka topic: Receive and process events published to a specific Kafka topic.
  • Filter events before processing: Apply filter expressions to select only the events that match your criteria.
  • Start a process model for each event: Trigger an automated process for every matching event.
  • Write event data to records: Store incoming event data directly in Appian record types.

Elements of this object

An event consumer contains the following elements:

Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to closeannotated screenshot of the event consumer object configuration

# Section Actions
1 Connection configuration Select the connected system, topic, consumer group ID, and offset reset configuration.
2 Event properties Define the data types for event headers and body.
3 Event filter Write a filter expression to select which events to process.
4 Event handler Configure the service account and action expression for each event.

Connection configuration

The connection configuration connects the event consumer to a Kafka cluster and topic. The following table describes each field:

Field Description
Connected System The Apache Kafka connected system that establishes and maintains the connection to the Kafka broker.
Topic Name The Kafka topic with the events you want to consume. If you do not see the expected topic, confirm with your Kafka administrator that the consumer is authorized to access it.
Consumer Group ID A unique identifier for the consumer group. Appian generates an ID in the format <integer>_ec_<UUID>. If your Kafka administrator does not provide a group ID, copy this value and send it to your Kafka administrator so the consumer can be registered with the broker. If your Kafka administrator provides a group ID, replace the generated value with that ID.
Offset Reset Configuration Determines which events to consume when the consumer is activated. Select Earliest to consume all events in the topic, or Latest to consume only the newest events.

Event properties

Event properties define the data types for each part of an incoming event. The following table describes each field:

Field Description
Key The data type for the event key. Set to Text by default.
Headers The data type for event headers. Set to Text by default.
Body The data type for the event body. Select either Text or JSON.

Event filter

An event filter is an optional expression that determines which events the consumer processes. The filter expression must return true or false for each event. Events that return true are passed to the event handler.

The filter expression can reference event data using the ev! domain (for example, ev!item.headers, ev!item.key, and ev!item.value), constants using the cons! domain, and data types using the type! domain.

For example, if you want to filter based on the event's key, the filter might look like the following:

1
2
3
4
5
6
7
8
9
10
11
or(
  contains(
    cons!ALLOWED_KEYS,
    ev!item.key
  ),
  and(
    exact(ev!item.key, "mid"),
    exact(ev!item.headers.priority, "Mid")
  ),
  exact(ev!item.key, "lost")
)

Event handler

The event handler defines the action to take for each event that passes the filter. The event handler requires a service account and an action expression.

Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to closeEvent handler section of the event consumer configuration pane

A service account is a special type of user account in Appian that is a member of the Service Account system group. For event consumers, the event handler's action runs in the user context of a service account. The service account allows the handler to access the information and processes in Appian needed to run the action you configure.

Grant service accounts the appropriate permissions to act on behalf of the event consumer. See Required permissions for event consumer service accounts for what permissions to grant.

Only system administrators can create service accounts. The following options are available for creating service accounts:

  • Event handler section: In the Event Handler section of the event consumer object.
  • Admin Console: When creating an API key in the Admin Console.
  • System group: By creating a user and adding it to the Service Accounts system group.

Note:  We recommend creating an account specific to each event consumer.

Required permissions

To let the consumer start a process, grant the service account Initiator permissions to the process model, along with any other permissions required for the smart services used in the process model. See each smart service page for the permissions needed.

Create an action

The event handler lets you define an expression that takes an action for each event. The action expression can use the following functions:

  • a!writeRecords(): Write event data directly to a record type.
  • a!startProcess(): Start a process model for each event. Set the isSynchronous parameter to false.

The expression can access properties of the event using the ev! domain.

For example, you could write event data directly to a record type:

1
2
3
4
5
6
7
8
9
a!writeRecords(
  records: {
    recordType!Claim(
      recordType!Claim.fields.claimId: ev!item.value.claimId,
      recordType!Claim.fields.status: ev!item.value.status,
      recordType!Claim.fields.submittedDate: now()
    )
  }
)

You could also start a process and pass the event data as a process parameter:

1
2
3
4
5
6
a!startProcess(
  processModel: cons!AR_CREATE_CLAIM_PROCESS,
  processParameters: {
    claim: ev!item.value,
  }
)

The claim process can then write the event data to a record type and make the data available in other parts of the application.

Security

Object security for event consumers is configured through role maps. By default, only the object creator has access to the event consumer.

The following table outlines the actions that can be completed for each permission level in an event consumer's security role map:

Actions Administrator Editor Viewer Deny
View the event consumer definition Yes Yes Yes No
Update the event consumer definition Yes Yes No No
Test the event consumer Yes Yes No No
View the security Yes Yes No No
Rename the event consumer Yes Yes No No
Start or stop the event consumer Yes Yes No No
Update the security Yes No No No
Delete the event consumer Yes No No No

Manage the object

Common object options

The following table lists the common object options available for event consumers:

Option Available
Versioning Yes
Renaming Yes
Viewing Appian design guidance No
Duplicating No
Viewing performance details No
Object overwrite protection Yes

Create the object

Event consumers require an Apache Kafka connected system to connect to a Kafka cluster. Before you create the event consumer, make sure you have the following information:

  • Connected system: An Apache Kafka connected system configured with your Kafka cluster credentials.
  • Topic name: The name of the topic you want to consume events from.
  • Consumer group ID format: If specific to your enterprise, the consumer group ID format mandated by your Kafka administrator.
  • Event format: The format of the events produced by Kafka.
  • Credentials: Credentials with the list topics permission.

To create an event consumer:

  1. In the Build view, click NEW > Event Consumer.
  2. In Create Event Consumer, configure the following properties:

    Property Description
    Name The name of the event consumer displayed in Appian Designer. Follow the recommended naming standard.
    Description A description of the event consumer displayed in Appian Designer.
  3. Click CREATE.

After creating the event consumer, configure the connection, optionally add an event filter, and set up the event handler.

Delete the object

Caution:  Deleting an event consumer cannot be undone. Any objects that depend on it will be broken.

To delete an event consumer:

  1. In Appian Designer, navigate to the event consumer.
  2. Click the gear icon and select Delete.
  3. In the confirmation dialog, click DELETE.

Test event consumption

Once you've configured the consumer, you can run tests to ensure that the correct topic is being consumed, the filtering is applied correctly, and the correct action is taken for each event.

To test event consumption:

  1. Review the test window and offset reset configuration settings and make any necessary adjustments.

    Note:  When testing in a development environment, you may need to temporarily change the offset reset configuration to simulate the consumer's behavior in production. Confirm this value is correct before deploying the consumer to higher environments.

  2. For Number of Test Events, enter the number of events to consume during the test.
  3. Click Test.

Appian ends the test when the set number of test events have been consumed or when 2 minutes have passed.

When stop at first error is enabled, testing stops immediately when the first event fails. The test results display the failed event and error details so you can debug the issue.

Event consumer states

Event consumers have the following states:

  • Active: The consumer is listening for new events on the topic.
  • Inactive: The consumer is not listening for events, so no action will be taken on any new events.
  • Consumer Error: Appian stopped the consumer because of an event processing error. The banner shows the last time an event was processed.

When the consumer is first created, it is inactive so you can configure the object, add filtering, and set up the event handler.

  • To set the consumer to active, click Start.
  • To set the consumer to inactive, click Stop.

Errors may occur when activating the consumer or once it's active. If this happens, the consumer displays an error message and lets you try to activate the consumer again.

Automatic stop on error

By default, Appian immediately deactivates the event consumer when it encounters an error for an individual event. When this happens, Appian does not commit the offset for the failed event, so the event can be reprocessed after the underlying issue is resolved.

When the consumer deactivates due to one of these errors, Appian sends two email alerts: one for the individual event processing error and one for the deactivation. For details on email alerts, see Monitor and troubleshoot Kafka integration.

Reactivate a stopped event consumer

To reactivate a consumer that was deactivated by Appian:

  1. Resolve the underlying issue. The fix may need to be done in Appian, such as correcting the expression logic in the event filter or event handler.
  2. In the event consumer, click Start.

The consumer resumes from the failed event since its offset was not committed.

If you reactivate the consumer, the first event to be processed depends on the offset reset configuration. If the reset value is Earliest, Appian resumes processing with the earliest event in the queue. If the reset value is Latest, Appian resumes processing with the most recent event; any events that occurred when the consumer was inactive are not processed by Appian.

Event consumer requirements

System requirements

To consume Kafka events in Appian, your environment must meet the following hardware requirements:

  • Minimum site memory: 15 GB. For high-availability (HA) or multi-node configurations, ensure each application server node meets the 15 GB minimum.
  • Process execution engines: If you start standard processes when an event is consumed, ensure you have engine availability to meet that demand. Engine resources are shared among automated and user-initiated processes, so you may need to scale up your site if performance is lessened significantly. Autoscaled processes automatically engage additional resources based on load.
  • Databases: If your event handling writes records, ensure the source database is scaled to handle any additional load.

Testing and performance

Performance depends on your event data volume, filtering, event complexity, and the available processing resources. Test the consumer thoroughly to ensure your site meets your performance requirements.

If you plan to deploy multiple event consumers in an environment, test the impact of running these simultaneously with production loads.

Event size requirements

By default, Appian supports events that are 1 MB or smaller.

Deployment configuration

When deploying event consumers across environments, you can customize environment-specific settings using an import customization file. See event consumer import customization properties for the full list of configurable fields and auto-activation behavior.

Versioning

Each time you save, you create a new version of the event consumer. You can use the version history to track changes, compare behavior across releases, and revert if needed. When you deploy an event consumer, you move a specific version of its configuration to a target environment.

Tip:  Establish a simple version tag convention in your export package description (for example, eventConsumer:newClaim v14). An easy-to-understand name makes rollbacks and cross-environment comparisons faster.

You can use different functions to configure the filter condition and event handler expressions.

The following table outlines which functions can be used to create each of these types of expressions. The Supported in column uses the following icons:

  • Filter conditions.
  • Event handler expressions.
Category Function Description Supported in
Array a!flatten()

Converts an array that contains other arrays into an array of single items.

Array a!update()

Inserts new values or replaces existing values at the specified index or field name and returns the resulting updated data.

Array append()

Appends a value or values to the given array, and returns the resulting array.

Array index()

Returns the data[index] if it is valid or else returns the default value.

Array insert()

Inserts a value into the given array and returns the resulting array.

Array joinarray()

Concatenates the elements of an array together into one string and inserts a string separator between each element.

Array ldrop()

Drops a given number of values from the left side of an array and returns the resulting array.

Array length()

This function returns the number of elements in an array.

Array rdrop()

Drops a given number of values from the right side of an array, and returns the resulting array.

Array remove()

Removes the value at a given index from an array, and returns the resulting array.

Array reverse()

Returns an array in reverse order.

Array updatearray()

Inserts new values or modifies existing values at the specified index of a given array, and returns the resulting array.

Array where()

Returns the indexes where the values in the input array are true.

Array wherecontains()

Receives one or more values and returns an array of indexes that indicate the position of the values within the array.

Base Conversion bin2dec()

Converts a Binary number as text to a Decimal number.

Base Conversion bin2hex()

Converts a Binary number as text to a Hex number as text.

Base Conversion bin2oct()

Converts a Binary number as text to an Octal number as text.

Base Conversion dec2bin()

Converts a Decimal number to a Binary number as text.

Base Conversion dec2hex()

Converts a Decimal number to a Hex number as text.

Base Conversion dec2oct()

Converts a Decimal number to an Octal number as text.

Base Conversion hex2bin()

Converts a Hex number as text to a Binary number as text.

Base Conversion hex2dec()

Converts a Hex number as text to a Decimal number.

Base Conversion hex2oct()

Converts a Hex number as text to an Octal number as text.

Base Conversion oct2bin()

Converts an Octal number as text to a Binary number as text.

Base Conversion oct2dec()

Converts an Octal number as text to a Decimal number.

Base Conversion oct2hex()

Converts an Octal number as text to a Hex number as text.

Connector a!httpAuthenticationBasic()

Creates an object that contains the information required to perform HTTP Basic authentication.

Connector a!httpFormPart()

Creates an HTTP form part which can be passed in an integration’s multipart request body.

Connector a!httpHeader()

Creates an HTTP header object which can be passed to an HTTP function.

Connector a!httpQueryParameter()

Creates an HTTP query parameter object which can be passed to an HTTP function.

Connector a!scsField()

Creates an object which contains the information required to access data in the Secure Credentials Store.

Connector a!verifyRecaptcha()

Allows you to verify the reCAPTCHA connection was successful and access reCAPTCHA scores to help protect your Portal against potentially malicious activity.

Connector a!wsConfig()

Constructs the config parameter to the webservicequery() and webservicewrite() functions.

Connector a!wsHttpCredentials()

Constructs a WsHttpCredentials object for use with a!wsConfig.

Connector a!wsHttpHeaderField()

Constructs a WsHttpHeaderField object for use with a!wsConfig.

Connector a!wsUsernameToken()

Constructs a WsUsernameToken object for use with a!wsConfig.

Connector a!wsUsernameTokenScs()

Constructs a WsUsernameTokenScs object for use with a!wsConfig.

Conversion displayvalue()

Tries to match a value in a given array with a value at the same index in a replacement array and returns either the value at the same index or a default value if the value is not found.

Conversion toboolean()

Converts a value to Boolean.

Conversion todate()

Converts a value to Date with Timezone.

Conversion todatetime()

Converts a value to Date and Time with Timezone.

Conversion todecimal()

Converts a value to Decimal (double-precision floating-point number).

Conversion toemailaddress()

Converts a value to email address.

Conversion tointeger()

Converts a value to Integer.

Conversion tointervalds()

Converts a value to Interval (Day to Second).

Conversion tostring()

Converts a value to Text.

Conversion totime()

Converts a value to Time.

Conversion touniformstring()

Converts a value or list to text, preserving the original scalar or array structure.

Custom Fields a!customFieldConcat()

Used to create a real-time custom record field, this function concatenates the specified values into a single value.

Custom Fields a!customFieldCondition()

Used in the whenTrue parameter of a!customFieldMatch(), this function allows you to create a condition.

Custom Fields a!customFieldDateDiff()

Used to create a real-time custom record field, this function returns the difference between two dates as a Number (Integer). The difference can be returned in days, hours, minutes, or seconds. Returns null when the startDate or endDate is null or empty.

Custom Fields a!customFieldDefaultValue()

Used to create a real-time custom record field, this function returns a default value when the specified value is null or empty. All parameters must be of the same data type. When there are multiple default parameters, each parameter is evaluated in order and the first non-null or non-empty default will be returned.

Custom Fields a!customFieldDivide()

Used to create a real-time custom record field, this function returns the results of dividing two numbers. You can use record fields, related record fields, or literal values of type Number (Integer) or Number (Decimal) in your calculation.

Custom Fields a!customFieldLogicalExpression()

Used in the whenTrue parameter of a!customFieldMatch(), this function allows you to group multiple logical conditions using the "AND" and "OR" operators.

Custom Fields a!customFieldMatch()

Used to create a real-time custom record field, this function evaluates the value parameter against multiple conditions and returns a value based on a match. If no match is found, the default parameter is returned.

Custom Fields a!customFieldMultiply()

Used to create a real-time custom record field, this function returns the result of multiplying a series of values. You can multiply record fields, related record fields, or literal values of type Number (Integer) or Number (Decimal).

Custom Fields a!customFieldSubtract()

Used to create a real-time custom record field, this function returns the difference between two numbers. You can subtract record fields, related record fields, or literal values of type Number (Integer) or Number (Decimal).

Custom Fields a!customFieldSum()

Used to create a real-time custom record field, this function returns a sum of values. You can calculate the sum of record fields, related record fields, or literal values of type Number (Integer) or Number (Decimal).

Date and Time a!addDateTime()

Adds the specified increments of time to the startDateTime and returns a date and time value. You can select a process calendar to ensure the return value falls within the specified working days and time.

Date and Time date()

Converts text into data accepted by the date data type and functions that require date parameters.

Date and Time datetime()

Converts the given Date and Time into a serial number that holds the Date and Time data type.

Date and Time datevalue()

Converts a value to a date.

Date and Time day()

Returns the day of the month from the date specified.

Date and Time dayofyear()

Returns the day number within the year.

Date and Time days360()

Returns the number of days between two dates, based on a 360-day calendar.

Date and Time daysinmonth()

Returns the number of days in the given month in the given year.

Date and Time edate()

Returns the date that is the number of months before or after the given starting date.

Date and Time eomonth()

Returns the date for the last day of the month that is the number of months before or after the given starting date.

Date and Time gmt()

Subtracts a time zone offset from a given Date and Time.

Date and Time hour()

Returns the hour from the time specified.

Date and Time intervalds()

Converts the given time components into an equivalent time duration, an interval expressing days to seconds. This value is treated as a duration (Joe ran the marathon in 3 hours and 23 minutes), not a point in time.

Date and Time isleapyear()

Returns a Boolean value for whether the given year is a leap year.

Date and Time lastndays()

Returns a Boolean value for whether the given date is within the last given number of days.

Date and Time local()

This is a Date and Time addition function, adding time zone offset to given Date and Time.

Date and Time milli()

This function returns the millisecond portion of a timestamp or the decimal number that represents 1 millisecond in days.

Date and Time minute()

Returns the minute from the time specified.

Date and Time month()

Returns the month from the specified date.

Date and Time now()

Returns the current Date and Time as a serial number.

Date and Time second()

Returns the seconds from the specified time.

Date and Time a!subtractDateTime()

Subtracts the specified increments of time from the startDateTime and returns a date and time value. You can select a process calendar to ensure the return value falls within the specified working days and time.

Date and Time time()

Converts the given time into an equivalent time value.

Date and Time timevalue()

Converts the given time into an equivalent interval.

Date and Time today()

Returns the current day in GMT.

Date and Time weekday()

Returns the day of the week of the specified date.

Date and Time weeknum()

Returns the week number within the year for the given date using a given methodology.

Date and Time year()

Returns the year for the date specified.

Date and Time yearfrac()

Determine the fraction of the year.

Evaluation a!localVariables()

Lets you define one or more local variables for use within an expression. When used within an interface, the value of each variable can be refreshed under a variety of conditions, configured using a!refreshVariable(). When used outside of an interface, all refresh properties configured using a!refreshVariable() are ignored.

Informational a!defaultValue()

Returns a default value when the specified value is null or empty. When there are multiple default parameters, each parameter is evaluated in order and the first non-null and non-empty default will be returned. Null, "", and {} are all considered null or empty values.

Conversion cast()

Converts a value from its existing type to the specified type.

Informational error()

Raises an error with the given message, used for invalidating execution.This function never returns a value.

Informational infinity()

Represents a constant number that stands for positive infinity or a negative infinity if you negate the value.

Informational isinfinite()

Tests given numbers against positive and negative infinity, returning true if the number is infinite, false if the number is not infinite.

Informational isnegativeinfinity()

Tests given numbers against negative infinity, returning true if number is negative infinity, false if number is not negative infinity.

Informational a!isNotNullOrEmpty()

Returns false if the value is null, an empty string, or an empty list. Otherwise returns true.

Informational isnull()

Returns true if value is null, false otherwise.

Informational a!isNullOrEmpty()

Returns true if the value is null, an empty string, or an empty list. Otherwise returns false.

Informational ispositiveinfinity()

Tests given numbers against positive infinity, returning true if the numbers are positive infinity, false if the numbers are not positive infinity.

Informational nan()

Constant number representing Not A Number, generally used for comparison to the result of mathematical operations with invalid inputs. This is equivalent to a decimal (floating point) null, but nan() is provided for more explicit usage in mathematical expressions.

Informational null()

Returns a null value.

Informational a!submittedOfflineTaskIds()

In an offline interface in Appian Mobile, returns a list of offline tasks ids that the user has submitted since their last data sync. If evaluated anywhere else, returns an empty list. Use this to automatically remove tasks from an offline task report after a user submits them.

Informational typename()

Returns the type name of a given type number.

Informational typeof()

Returns the type number of a given value.

Logical and()

Returns true if all inputs are true; returns false if at least one input is false.

Logical false()

Returns the Boolean value false.

Logical if()

Returns valueIfTrue if condition returns true; returns valueIfFalse otherwise.

Logical a!match()

Evaluates the value against multiple conditions and returns a value based on a match. If no match is found, the default is returned. For example, if "a" then "b" else "c".

Logical not()

Converts true into false, and false into true.

Logical or()

Returns true if any inputs are true; returns false if all inputs are false.

Logical true()

Returns the Boolean value true.

Looping a!forEach()

Evaluates an expression for each item in a list and returns a new array of the results.

Looping all()

Calls a rule or function that returns either true or false for each item in list, asks the question, "Do all items in this list yield true for this rule/function?", and returns true if all items in list evaluates to true.

Looping any()

Calls a rule or function that returns either true or false for each item in list by asking the question, "Do any items in this list yield true for this rule/function?" with the intent to discover if any item(s) yield true.

Looping filter()

Calls a predicate for each item in a list and returns any items for which the returned value is true.

Looping merge()

Takes a variable number of lists and merges them into a single list (or a list of lists) that is the size of the largest list provided.

Looping none()

Calls a rule or function that returns either true or false for each item in list by asking the question, "Do all items in this list yield false for this rule/function?" with the intent to discover if no items will yield true.

Looping reduce()

Calls a rule or function for each item in a list, passing the result of each call to the next one, and returns the value of the last computation.

Looping reject()

Calls a predicate for each item in a list, rejects any items for which the returned value is true, and returns all remaining items.

Mathematical abs()

Returns the absolute value(s) of the specified number(s).

Mathematical ceiling()

Rounds the number up to the nearest multiple of the specified significance.

Mathematical combin()

Calculates the number of unique ways to choose m elements from a pool of n elements.

Mathematical a!distanceBetween()

Returns the distance between the two locations (in meters) specified by the start and end coordinates. The distance is calculated by tracing a line between the two locations that follows the curvature of the Earth, and measuring the length of the resulting arc.

Mathematical e()

Returns the value of e.

Mathematical enumerate()

Returns a list of integer numbers from 0 through n-1.

Mathematical even()

Rounds positive numbers up to nearest even integer and negative numbers down to the nearest even integer.

Mathematical exp()

Returns e raised to the specified power.

Mathematical fact()

The factorial of specified number.

Mathematical factdouble()

The double factorial of specified number (mathematically n!!).

Mathematical floor()

Rounds the number down to the nearest multiple of the specified significance.

Mathematical int()

Rounds the specified number down to the nearest integer.

Mathematical ln()

Returns the natural logarithm of the specified number, which is the power that e must be raised to in order to equal the specified number.

Mathematical log()

Returns the logarithm of the number using the specified base, which is the power that base must be raised to, to equal the number.

Mathematical mod()

Returns the remainder of dividend when divided by the divisor.

Mathematical mround()

Rounds the number to the specified multiple.

Mathematical multinomial()

Adds the specified integers and divides the factorial of the sum by the factorial of the individual numbers.

Mathematical odd()

Rounds positive numbers up to nearest odd integer and negative numbers down to the nearest odd integer.

Mathematical pi()

Returns the value of pi.

Mathematical power()

Returns the base number raised to the specified exponent.

Mathematical product()

Returns the product of the specified numbers.

Mathematical quotient()

Returns the quotient when numerator is divided by the denominator, and drops the remainder.

Mathematical round()

Rounds off the number to the specified number of digits.

Mathematical rounddown()

Rounds the number down to the specified digit.

Mathematical roundup()

Rounds the number up to the specified digit.

Mathematical sign()

Returns 1 if the number is positive, -1 if the number is negative, and 0 if the number is zero.

Mathematical sqrt()

Returns the square root(s) of the specified number(s).

Mathematical sqrtpi()

Multiplies the number by pi, then returns the square root of the product.

Mathematical sum()

Returns the sum of the specified numbers.

Mathematical sumsq()

Squares each number and then returns the sum of the squares.

Mathematical trunc()

Truncates a decimal number to the specified number of places after the decimal point.

People togroup()

Converts a value to Group.

People topeople()

Converts a value to People.

People touser()

Converts a value to User.

Scripting datetext()

Interprets the date or datetime specified in the user's preferred calendar and returns its string representation using given format.

Scripting isInDaylightSavingTime()

Returns whether the given date and timezone are in daylight saving time.

Scripting offsetFromGMT()

Returns the offset (in minutes) from GMT of the given date and timezone.

Scripting property()

This function extracts a bean's property under a given key name (the nameOfProperty parameter).

Scripting repeat()

This function takes an input of Any Type and returns a list with the input repeated a specified number of times.

Scripting todatasubset()

The function takes an array of values as well as optional paging/sorting configurations and returns a DataSubset value with a subset of the array in a specified sort order and the total count of items in the initial array.

Scripting topaginginfo()

Returns a PagingInfo value for use with the todatasubset() function.

Array contains()

Checks whether an array contains the value.

Array difference()

Returns the values in array1 and not in array2.

Array intersection()

Returns only those elements that appear in all of the given arrays.

Array symmetricdifference()

Returns the values from two integer arrays that are not in both arrays.

Array union()

Returns all unique elements from the given arrays.

Statistical avedev()

Returns the average deviation of the specified number(s).

Statistical average()

Returns the average of the specified number(s).

Statistical count()

Returns the number items in all arrays passed to the function.

Statistical frequency()

Uses the bin array to create groups bounded by the elements of the array.

Statistical gcd()

Returns the greatest common denominator of the specified non-negative number(s), which is the largest number that divides all the given numbers without a remainder.

Statistical geomean()

Returns the geometric mean of the specified number(s).

Statistical harmean()

Returns the harmonic mean of the specified number(s), which is the number of terms divided by the sum of the terms' reciprocals.

Statistical lcm()

Returns the least common multiple of the specified non-negative number(s), which is the smallest number that is a multiple of all the given numbers.

Array lookup()

Returns location of data within multiple values, or valueIfNotPresent.

Statistical max()

Returns the maximum of the specified number(s).

Statistical median()

Returns the median of the specified number(s).

Statistical min()

Returns the minimum of the specified number(s).

Statistical mode()

Returns the mode of the specified number(s), which is the most commonly repeated element.

Statistical rank()

Returns an integer representing the rank of the number in the specified array.

Statistical stdev()

Returns the standard deviation of the specified number(s).

Statistical stdevp()

Returns the standard deviation of the specified number(s), assuming that the numbers form the entire data set and not just a sample.

Statistical var()

Returns the variance of the specified number(s).

Statistical varp()

Returns the variance of the specified number(s), assuming that the numbers form the entire data set and not just a sample.

System a!dataSubset()

Creates a value of type DataSubset for defining the source of expression-backed records and for use with a!pickerFieldCustom, leaving the data as provided. To apply sorting and paging, use todatasubset().

System a!endsWith()

Checks if a text value ends with a specified text value. For example: endsWith("apple","e") returns TRUE.

System a!fromJson()

Converts a JSON string into an Appian value.

一Old Versions一 a!fromJson 19r2()

Converts a JSON string into an Appian value.

System a!isBetween()

Checks if a value is within the specified range. The value can be of type date, date and time, number integer, or number decimal.

System a!isInText()

Checks if a text value contains a specified text value. For example: isInText("apple","p") returns TRUE.

System a!pagingInfo()

Creates a value of type PagingInfo for use with grids, queries, and todatasubset().

System a!sortInfo()

Creates a value of type SortInfo for use with grids and record queries.

System a!startsWith()

Checks if a text value begins with a specified text value. For example: startsWith("apple","a") returns TRUE.

System a!toJson()

Converts a value into a JSON string.

一Old Versions一 a!toJson 17r1()

Converts a value into a JSON string.

System a!doesUserHaveAccess()

Determines whether the logged in user has access to view a field based on the field-level security configured on the record type.

System a!map()

Creates a map of values (Any Type) with each value stored at the corresponding string key. Values stored in maps are not wrapped in variants.

System a!pageResponse()

Identifies the data in the current integration response, and the path of the next set of data to request. This function should be used to return data in a record data source expression when the integration uses a non-integer pagination value.

System a!selectionFields()

Returns all fields from a record type and any of its related record types within a query. You can also query specific fields from other record types at the same time.

Smart Service a!testRunResultForId()

Provided a test-run ID, this function returns a TestRunResult data type containing the results of a rule test run. If the status of the test is IN PROGRESS, TestRunResult will contain only results for completed tests; if the status is COMPLETE, TestRunResult contains all test results.

Smart Service a!testRunStatusForId()

Provided a test-run ID, this function queries for the status of an expression rule test run.

Text cents()

Converts a number into its value in cents by effectively appending a cent sign to a fixed representation and one comma for every three digits preceding the decimal.

Text char()

Converts a number into its Unicode character equivalent.

Text charat()

Returns the character at given index within specified string.

Text clean()

Returns the specified text, minus any characters not considered printable. Printable characters are the 95 printable ASCII characters plus three special characters: BACKSPACE (0x08), TAB (0x09), and NEWLINE (0x0a).

Text cleanwith()

Returns the specified text, minus any characters not in the list of valid characters.

Text code()

Converts the text into Unicode integers.

Text concat()

Concatenates the specified strings into one string, without a separator.

Text a!currency()

Localizes a currency value based on the given ISO currency code.

一Old Versions一 currency 22r4()

Converts a decimal number into a generic currency value by effectively adding a generic currency symbol (¤), a decimal point, and one comma for every three digits preceding the decimal.

Text exact()

Compares two given text strings in a case-sensitive manner, returning true only if they are exactly the same.

Text extract()

Returns the value (or values, if the text contains multiple delimited values) between the delimiters from the given text.

Text extractanswers()

Returns an array of strings that respond to the questions provided.

Text find()

Searches the text for a particular substring, returning the positional index of the first character of the first match.

Text fixed()

Rounds the specified number off to a certain number of decimals and returns it as text, with optional commas.

Text a!formatPhoneNumber()

Returns a formatted phone number based on the outputFormat parameter. The countryCode parameter, or any country code provided in the phone number, will verify that the phone number is valid. If the phone number does not match any provided country code, the phone number will be returned as invalid and unformatted.

Text initials()

Returns only the uppercase characters from within the given text.

Text insertkey()

Returns the provided text, wrapped with the specified delimiters.

Text insertkeyval()

Returns the provided key-value pairs, wrapped with the specified delimiters.

Text insertquestions()

Returns an array of questions with a ==EOQ== at the end, returning a single string that can be parsed with extractanswers() function after it has been filled in by a user.

Text a!isPhoneNumber()

Returns true if the phoneNumber parameter contains a valid phone number, otherwise returns false. A phone number is considered valid if its area code is valid, the length is appropriate based upon the value of the countryCode parameter, and the number after the area code is not all zeroes. This function supports countries and area codes for international numbers.

Text keyval()

Returns the value(s) associated with the given key(s).

Text left()

Returns a specified number of characters from the text, starting from the first character.

Text leftb()

Returns a specified number of bytes from the text, starting from the first byte.

Text len()

Returns the length in characters of the text.

Text lenb()

Returns the length in bytes of the text.

Text like()

Tests whether a string of text is like a given pattern.

Text lower()

Converts all characters in the text into lowercase (Unicode case folding).

Text mid()

Returns a substring from the middle of the specified text.

Text midb()

Returns a substring from the middle of the specified text.

Text padleft()

Pads text with spaces on the left so that it is a certain length.

Text padright()

Pads text with spaces on the right so that it is a certain length.

Text proper()

Converts each character in the text into proper case, meaning it will capitalize the first first letter of every word and convert the rest into lowercase.

Text replace()

Replaces a piece of the specified text with new text.

Text replaceb()

Replaces a piece of the specified text with new text.

Text rept()

Concatenates the text to itself a specified number of times and returns the result.

Text right()

Returns a specified number of characters from the text, starting from the last character.

Text search()

Searches the text for the given, case insensitive substring. Returns the one-based positional index of the first character of the first match. Returns zero if the substring is not found.

Text searchb()

Searches the text for a particular substring, returning the positional index of the first byte of the first match.

Text soundex()

Returns the soundex code, used to render similar sounding names via phonetic similarities into identical four (4) character codes.

Text split()

Splits text into a list of text elements, delimited by the text specified in the separator.

Text strip()

Returns the provided text, minus any characters considered printable. Printable characters are the 95 printable ASCII characters plus three special characters: BACKSPACE (0x08), TAB (0x09), and NEWLINE (0x0a).

Text stripHtml()

Changes the provided HTML string into a plain text string by converting <br>, <p>, and <div> to line breaks, stripping all other tags, and converting escaped characters into their display values.

Text stripwith()

The function returns the provided text, minus any characters on the list of invalid characters.

Text substitute()

Substitutes a specific part of a string with another string.

Text a!swissFranc()

Converts the number into a Swiss franc value. Effectively adds a decimal point and an apostrophe for every three digits preceding the decimal. It also adds an optional Swiss franc symbol preceding the value.

Text text()

The text() function allows you to format Number, Date, Time, or Date and time values as you convert them into text strings.

Text toHtml()

Converts a string in plain text to the HTML equivalent that displays appropriately in an HTML page, by replacing reserved characters with their escaped counterparts.

Text trim()

Removes all unnecessary spaces from the text.

Text upper()

Converts all letters in the text into uppercase.

Text value()

Converts text representing a number into an actual number or datetime.

Trigonometry acos()

Returns the arccosine(s) of the specified number(s) in radians.

Trigonometry acosh()

Returns the hyperbolic arccosine(s) of the specified number(s) in radians.

Trigonometry asin()

Returns the arcsine(s) of the specified number(s) in radians.

Trigonometry asinh()

Returns the hyperbolic arcsine(s) of the specified number(s) in radians.

Trigonometry atan()

Returns the arctangent(s) of the specified number(s) in radians.

Trigonometry atanh()

Returns the hyperbolic arctangent(s) of the specified number(s) in radians.

Trigonometry cos()

Returns the cosine(s) of the specified number(s).

Trigonometry cosh()

Returns the hyperbolic cosine(s) of the specified number(s).

Trigonometry degrees()

Converts the measure(s) of the specified angle(s) from radians to degrees.

Trigonometry radians()

Converts the measure of the specified angle from degrees to radians.

Trigonometry sin()

Returns the sine(s) of the specified number(s).

Trigonometry sinh()

Returns the hyperbolic sine(s) of the specified number(s).

Trigonometry tan()

Returns the tangent(s) of the specified number(s).

Trigonometry tanh()

Returns the hyperbolic tangent(s) of the specified number(s).

See also

Feedback