Create Custom Record Fields

This page explains how to create custom record fields in your record type with data sync enabled.

Overview

One of the benefits of syncing your data into Appian is that you can make changes in your applications faster, and this benefit applies to changes to your data as well. When you enable sync, you can extend your data by transforming and manipulating existing record data into new custom record fields.

Custom record fields allow you to use predefined templates or free-form expressions to easily define how your record data is calculated, simplified, or transformed, then present those values as new fields in your record type.

In the past, if you wanted to transform your data, you'd need to create expression rules to query and manipulate your data, and then reference these rules throughout your applications. Alternatively, you may have transformed this data outside of Appian using complex SQL statements to create database views. Now, you can avoid creating elaborate queries in a database view or in Appian by creating custom record fields.

For example, say you have a Support Case record type that has the record fields dateSubmitted and dateClosed, and you want to know which tickets took longer than 7 days to close. Instead of creating an expression rule or a database view to continuously calculate this value, you can create a custom record field called slaStatus.

Using a low-code template, you can calculate the difference between the ticket's submitted date and its closed date, then display values as On Time when a ticket is open less than 7 days, and Late when a ticket is open longer than 7 days. You can even account for tickets that are still in progress using a display value, so any tickets without a closed date display as In Progress.

Once you create a custom record field, the field is available on the record type and the values are cached in Appian. This allows you to reference custom record fields as quickly and easily as any other record field in the record type–no additional properties or queries necessary. With simple record type field references, you can leverage your custom record fields in grids, reports, user filters, and more.

Back in our example, the Support Case record type can now display the slaStatus field as another column in a read-only grid, and even filter and sort the list by slaStatus. You can also create reports that shows the number of cases by status, or which support engineers close the most cases on time. To learn how to leverage records in your reports, see Configure Charts Using Records or Configure Read-Only Grids.

Create custom record fields

Custom record fields can be created on any record type that has data sync enabled.

Depending on the template you select, you can either reference record fields in the record type, or related record fields from a one-to-many relationship. References to other existing custom record fields are not currently supported in the custom record field configuration.

Record types with sync enabled can only have 100 fields, and no more than 20 of them can be custom record fields. For example, if your record type has 98 fields, you can only create two custom record fields.

To create a custom record field:

  1. Open a record type that has data sync enabled.
  2. On the Data Model page, click NEW CUSTOM RECORD FIELD.
  3. From SELECT A TEMPLATE, choose a template to guide you through the configuration process, or select Write Your Own Expression to use Expression Mode to configure the field.
  4. Click NEXT.
  5. Under CONFIGURE VALUES, follow the template or create an expression using supported functions to configure the custom record field values.
  6. Click TEST to preview your custom record field values using your record data or test values.
    • Select View Record Data to test your configuration against your existing record fields. This is selected by default, and is useful when you already have production-like data in your environment.
    • Select Enter Test Values to return custom record field values based on sample values. You can test up to five values. This option is useful when you want to test specific scenarios, or if you don't have data in your environment.
  7. Click NEXT.
  8. Under SET NAME AND TYPE, enter a name for the custom record field. This is how you'll reference the field throughout your applications. If you use a template, the name will default to the record field used in the configuration appended with the template name.
  9. From the Type dropdown, select the data type for the custom record field. If you use a template, the type will default to the appropriate data type based on your configuration.
  10. Under Error Value, choose the value to display if there is an error evaluating a value in the custom record field:
    • Choose Null to display a null value.
    • Choose Custom to enter a custom error value. The custom error value must be a literal value of the same data type as the custom field. You cannot create custom error values for custom record fields of type User.
  11. Click CREATE.

The custom record field will appear in the list of record fields with a calculator icon .

To edit the custom record field, click the edit icon . To remove a custom record field, click the delete icon .

New custom record field

Templates

Appian provides a series of templates that allow you to create a custom record field using a guided experience. These templates provide an alternative to modifying or rearchitecting your source data to fix even small changes.

Use the following templates to create your custom record fields:

Groups based on a range

The Groups based on a range template uses a range to organize your numerical data into groups. This template only supports record fields of type Number (Integer) or Number (Decimal).

To use this template, determine the range of values to include in each group. The group name will replace the numerical values in the new custom record field. You must have a minimum of two groups, and the last group will always include any remaining values that were not specifically placed in a group.

For example, let's say you have a record field called price, and you want to create a chart that shows the distribution of prices in your orders.

Using this template, you can create a new custom record field called priceGroup so all prices that are less than or equal to $10 display as Low, prices greater than $10 and less than or equal to $30 display as Medium, and all other prices display as High.

Groups based on a range

Once you create the custom record field, you can use the record type to build a chart and easily display the count of items by price group.

Groups based on text values

The Groups based on text values template allows you to organize the text values from a record field into groups. This template only supports record fields of type Text.

To use this template, specify which text values to add to each group. Use the Contains operator to include any record field values that contain a partial match to the specified keyword or keywords, or use the In operator to specify the exact record field values to include in the group.

When you add text values to a group, the group name will replace those values in the new custom record field. You must have a minimum of two groups, and the last group will always include any remaining values that were not specifically placed in a group.

For example, say you have a record field called title that contains all job titles in your organization, and you want to create a pie chart that displays the number of employees per functional area.

Using this template, you could combine all titles that contain the keyword "Software" or "Quality" into a group called Engineers. This means any employees with titles like Associate Software Engineer, Quality Engineer II, or Lead Software Engineer will appear as Engineering in the custom record field. You could create a group for each functional area using this same logic, and include any remaining titles in the Other group.

Groups based on text

With your new custom record field, you can now build a pie chart that displays the number of employees per functional area.

Groups based on a date difference

The Groups based on a date difference template allows you to calculate the difference between two dates and organize the difference into groups. This template requires two record fields of type Date or Date and Time.

To use this template, you'll first choose a unit of time like Days, Weeks, Months, or Years to calculate the difference between the two dates. The difference is returned as an Integer, which can then be organized into groups. You must have a minimum of two groups, and the last group will always include any remaining values that were not specifically placed in a group.

For example, say you have the record fields dateAssigned and dateClosed and you want to display the number of days it took to close each ticket on your record list. Using this template, you can create a custom record field that calculates the number of days between the ticket's assigned date and closed date. Then, you can organize the differences into groups:

  • The One day group includes values less than or equal to 1 day.
  • The One week group includes values greater than 1 and less than or equal to 7.
  • The Over a week group includes all remaining values.

But what if the ticket hasn't been closed? This would make the dateClosed null. To handle a null date, you can specify a Default Value to appear on the custom record field. In this example, we could set the Default Value to In Progress.

Functions that return dynamic values, like today() or now(), are not currently supported in custom record fields. To edit your custom record field, see the list of supported functions.

Groups based on date diff

Now you can easily reference this new custom record field in your record list, and even sort and filter the list by this new field.

Extract partial dates

The Extract partial dates template allows you to return a particular value from a Date or Date and Time record field.

To use this template, select a Date or Date and Time field, then select the Unit of Time that you want to extract. You can choose to extract the day, month, or year from the field, or calculate the day of the week, the week of the year, or the quarter from a given date.

For example, say you have a Date and Time field called dateSubmitted, but you only need to know the date a ticket was submitted, not the time. You could use this template to create a custom record field called shortDateSubmitted to extract the date from the dateSubmitted field and set the new field to type Date.

Extract partial date template

Now, you can use this field to display submission dates on your record lists, records, and reports.

The Aggregate related record fields template allows you to aggregate and filter a related record field from a one-to-many relationship. You can use this template when your record type has a one-to-many relationship, or when a related record type has a one-to-many relationship.

To use this template, select a related record and choose an Aggregation Function to calculate the sum, average, count, distinct count, maximum, or minimum of the related record field. If needed, you can also apply one or more filters to your aggregation to determine which values are included in the calculation.

For example, let's say you have a Customer record type that has a one-to-many relationship with the Case record type, and you want to create a report that shows the number of open cases associated with each customer.

On the Customer record type, you can use this template to create a custom record field that calculates the count of Ids from the Case record type that have a status of Open.

/aggregate-related-fields

Once you create the field, the aggregation will automatically be grouped by the common field shared between the two record types. In this example, that would be the customer Id. You could then reference this field in a KPI or read-only grid to quickly and easily display an aggregations without any additional queries.

"At least one" filter behavior

In the example above, you are aggregating and filtering on the same related record type (the Case record type). Now, let's look at an example where you aggregate and filter on different related record types.

For example, let's say the Customer record type also has a one-to-many relationship with the Order record type, and you want to create a report that shows, for each customer, how many orders include a clearance item.

In this example, the order item information is on a separate record type called Order Item. Since the Order record type has a relationship with the Order Item record type, you can reference related record fields from the Order Item record type in the custom record field.

To create this custom record field on the Customer record type, you would get the count of Ids from the Order record type, then apply a filter on the isClearance field from the Order Item record type.

at-least-one-crf-ex

Since there is a one-to-many relationship between the Order and Order Item record types, the custom field will count any orders that have at least one clearance item. This at least one filter behavior occurs when there is a one-to-many relationship between where you are aggregating and where you are filtering.

Learn more about "at least one" filter behavior.

When you filter the aggregation by a date or date and time field, you can select a Date Preset as your filter value.

These presets will dynamically filter your data based on the selected time frame. For example, if you select the date preset Today, the filter value will update each day to reflect the correct date. When you use a Date Preset, all date and time values are returned in Greenwich Mean Time (GMT).

The tables below lists the available date presets for Date or Date and Time related record fields. To ensure you're selecting the correct date preset, review the underlying expression associated with each preset.

You cannot modify the underlying expression of the date preset, nor can you create your own expression in this template. The tables below are for reference only.

Date presets for Date fields
Filter Operator Available Date Preset Underlying Expression Example (If today is September 24, 2021)
=, <>, >, >=, <, <= Today today() 9/24/2021
=, <>, >, >=, <, <= Yesterday today()-1 9/23/2021
=, <>, >, >=, <, <= Day Before Yesterday today() -2 9/22/2021
=, <>, >, >=, <, <= Today Last Week today() - 7 9/17/2021
=, <>, >, >=, <, <= Today Last Month date(year(eomonth(today(), -1)), month(eomonth(today(), -1)), day(today())) 8/24/2021
=, <>, >, >=, <, <= Today Last Year edate(today(), -12) 9/24/2020
Date Range Week-to-Date (From Monday of the Current Week) {today() - weekday(today(), 2) + 1, today()} {9/20/2021, 9/24/2021}
Date Range Week-to-Date (From Sunday of the Current Week) {today() - weekday(today(), 1) + 1, today()} {9/19/2021, 9/24/2021}
Date Range Previous Week-to-Date (From Monday to Today of the Previous Week) {todate(today() - 7 - weekday(today(), 2) + 1), today() - 7 } {9/13/2021, 9/17/2021}
Date Range Previous Week-to-Date (From Sunday to Today of the Previous Week) {todate(today() - 7 - weekday(today(), 1) + 1), today() - 7 } {9/12/2021, 9/17/2021}
Date Range Month-to-Date {eomonth(today(),-1) + 1, today()} {9/1/2021, 9/24/2021}
Date Range Previous Month-to-Date (From Beginning of Last Month to Today Last Month) {eomonth(date(year(eomonth(today(), - 1)), month(eomonth(today(), - 1)), day(today())), - 1) + 1, date(year(eomonth(today(), - 1)), month(eomonth(today(), - 1)), day(today()))} {8/1/2021, 8/24/2021}
Date Range Month-to-Date Last Year (From Beginning of This Month Last Year to Today Last Year) {eomonth(today(),-13) + 1, edate(today(), -12)} {9/1/2020, 9/24/2020}
Date Range Year-to-Date {date(year(today()), 1, 1), today()} {1/1/2021, 9/24/2021}
Date Range Previous Year-to-Date (From Beginning of Last Year to Today Last Year) {date(year(today())-1, 1, 1), edate(today(), -12)} {1/1/2020, 9/24/2020}
Date Range Beginning of Last Month to Today {eomonth(today(),-2) + 1, today()} {8/1/2021, 9/24/2021}
Date Range Trailing 3 Months {eomonth(today(),-4) + 1, eomonth(today(),-1)} {6/1/2021, 8/31/2021}
Date Range Trailing 6 Months {eomonth(today(),-7) + 1, eomonth(today(),-1)} {3/1/2021, 8/31/2021}
Date Range Trailing 9 Months {eomonth(today(),-10) + 1, eomonth(today(),-1)} {12/1/2020, 8/31/2021}
Date Range Trailing 12 Months {eomonth(today(),-13) + 1, eomonth(today(),-1)} {9/1/2020, 8/31/2021}
Date Range Trailing 18 Months {eomonth(today(),-19) + 1, eomonth(today(),-1)} {3/1/2020, 8/31/2021}
Date presets for Date and Time fields
Filter Operator Available Date Preset Underlying Expression Example (If today is September 24, 2021 at 2:30 PM GMT)
=, <>, >, >=, <, <= Today: Current Time now() 9/24/2021 2:30 PM GMT+00:00
=, <>, >, >=, <, <= Today: Beginning of the Day todatetime(today()) 9/24/2021 12:00 AM GMT+00:00
=, <>, >, >=, <, <= Yesterday: Current Time That Day now() - 1 9/23/2021 2:30 PM GMT+00:00
=, <>, >, >=, <, <= Yesterday: Beginning of the Day todatetime(today()-1) 9/23/2021 12:00 AM GMT+00:00
=, <>, >, >=, <, <= Day Before Yesterday: Current Time That Day now() -2 9/22/2021 2:30 PM GMT+00:00
=, <>, >, >=, <, <= Day Before Yesterday: Beginning of the Day todatetime(today()-2) 9/22/2021 12:00 AM GMT+00:00
Date Range Today: From Midnight to Current Time {todatetime(today()), now()} {9/24/2021 12:00 AM GMT+00:00, 9/24/2021 2:30 PM GMT+00:00}
Date Range Yesterday: From Midnight to Current Time That Day {todatetime(today()-1), now()-1} {9/23/2021 12:00 AM GMT+00:00, 9/23/2021 2:30 PM GMT+00:00}
Date Range Day Before Yesterday: From Midnight to Current Time That Day {todatetime(today()-2), now()-2} {9/22/2021 12:00 AM GMT+00:00, 9/22/2021 2:30 PM GMT+00:00}
Date Range Week-to-Date (From Monday of the Current Week) {todatetime(today() - weekday(today(), 2) + 1), now()} {9/20/2021 12:00 AM GMT+00:00, 9/24/2021 2:30 PM GMT+00:00}
Date Range Week-to-Date (From Sunday of the Current Week) {todatetime(today() - weekday(today(), 1) + 1), now()} {9/19/2021 12:00 AM GMT+00:00, 9/24/2021 2:30 PM GMT+00:00}
Date Range Previous Week-to-Date (From Monday to Today of the Previous Week) {todatetime(today() - 7 - weekday(today(), 2) + 1), now()-7} {9/13/2021 12:00 AM GMT+00:00, 9/17/2021 2:30 PM GMT+00:00}
Date Range Previous Week-to-Date (From Sunday to Today of the Previous Week) {todatetime(today() - 7 - weekday(today(), 1) + 1), now()-7} {9/12/2021 12:00 AM GMT+00:00, 9/17/2021 2:30 PM GMT+00:00}
Date Range Month-to-Date {todatetime(eomonth(today(),-1) + 1), now()} {9/1/2021 12:00 AM GMT+00:00, 9/24/2021 2:30 PM GMT+00:00}
Date Range Previous Month-to-Date (From Beginning of Last Month to Today Last Month) {todatetime(eomonth(date(year(eomonth(today(), - 1)), month(eomonth(today(), - 1)), day(today())), - 1) + 1), datetime(year(eomonth(today(), - 1)), month(eomonth(today(), - 1)), day(today()), hour(now()), minute(now()), second(now()), milli(now()))} {8/1/2021 12:00 AM GMT+00:00, 8/24/2021 2:30 PM GMT+00:00}
Date Range Year-to-Date {datetime(year(today()), 1, 1), now()} {1/1/2021 12:00 AM GMT+00:00, 9/24/2021 2:30 PM GMT+00:00}
Date Range Month-to-Date Last Year (From Beginning of This Month Last Year to Today Last Year) {todatetime(eomonth(today(),-13) + 1), if(isleapyear(year(now())), now() - 366, now() - 365)} {9/1/2020 12:00 AM GMT+00:00, 9/24/2020 2:30 PM GMT+00:00}
Date Range Previous Year-to-Date (From Beginning of Last Year to Today Last Year) {datetime(year(today()) - 1, 1, 1), edate(today(), - 12) + (now() - today())} {1/1/2020 12:00 AM GMT+00:00, 9/24/2020 2:30 PM GMT+00:00}
Date Range Beginning of Last Month to Today {todatetime(eomonth(today(),-2) + 1), now()} {8/1/2021 12:00 AM GMT+00:00, 9/24/2021 2:30 PM GMT+00:00}
Date Range Trailing 3 Months todatetime({eomonth(today(),-4) + 1, eomonth(today(),-1) + 1}) {6/1/2021 12:00 AM GMT+00:00, 9/1/2021 12:00 AM GMT+00:00}
Date Range Trailing 6 Months todatetime({eomonth(today(),-7) + 1, eomonth(today(),-1) + 1}) {3/1/2021 12:00 AM GMT+00:00, 9/1/2021 12:00 AM GMT+00:00}
Date Range Trailing 9 Months todatetime({eomonth(today(),-10) + 1, eomonth(today(),-1) + 1}) {12/1/2020 12:00 AM GMT+00:00, 9/1/2021 12:00 AM GMT+00:00}
Date Range Trailing 12 Months todatetime({eomonth(today(),-13) + 1, eomonth(today(),-1) + 1}) {9/1/2020 12:00 AM GMT+00:00, 9/1/2021 12:00 AM GMT+00:00}
Date Range Trailing 18 Months todatetime({eomonth(today(),-19) + 1, eomonth(today(),-1) + 1}) {3/1/2020 12:00 AM GMT+00:00, 9/1/2021 12:00 AM GMT+00:00}

Write your own expression

In addition to using a guided template, you can use Write your own expression to define your custom record field in Expression mode.

When you edit a custom record field, it will also appear in Expression Mode so you can make further customizations. The only exception to this is the Aggregate on Related Record Fields template, which allows you to edit the field using a guided experience.

When creating or editing a custom record field, note that constants, rules, and relationship references are not currently supported.

The following section provides a list of supported functions to use in your expressions, as well as some sample custom record field recipes. To use these recipes, you must have a record type with data sync enabled and modify the record type references to match your own record type.

When creating or editing a custom record field in Expression Mode, use the following supported functions.

Not all Appian functions can be used to create custom record fields. For a full list of functions, see the Appian Functions page.

Category Function Description
Connector a!cmiCopyDocumentFromAppian()

Copies an Appian document to a location in the CMIS target system, specified by the value of the objectId parameter.

Connector a!cmiCopyDocumentToAppian()

Copies a document from the CMIS target system to Appian, creating a new version of an existing Appian document.

Connector a!cmiCopyDocumentToAppianFolder()

Copies a document from the CMIS target system to an Appian folder, creating a new document.

Connector a!cmiCreateFolder()

Creates a folder in the CMIS target system.

Connector a!cmiDelete()

Deletes an object in the CMIS target system.

Connector a!cmiGetFolderChildren()

Retrieves the children of the folder given as the folderId parameter, obeying the given pagingInfo.

Connector a!cmiGetObjectIdByPath()

Retrieves the object id of a CMIS object based on the value given as the path parameter.

Connector a!cmiGetProperties()

Retrieves the properties of the CMIS object given as the objectId parameter.

Connector a!cmiGetRepoInfo()

Retrieves information about the target CMIS target system repository.

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!sapBapiParameters()

Retrieves the list of parameters required to call the given SAP BAPI.

Connector a!sapInvoke()

Invokes the given BAPI, returning the result.

Connector a!sblCreate()

Creates a new record in Siebel.

Connector a!sblDelete()

Deletes a record from Siebel.

Connector a!sblInvoke()

Invokes the method in Siebel, returning the result.

Connector a!sblInvokeWriter()

Invokes the method that will result in a modification to data in Siebel.

Connector a!sblQuery()

Retrieves records from Siebel.

Connector a!sblUpdateFieldValue()

Updates the values of the given record in Siebel.

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 internalize()

Converts the given externalized string representation of a value to the original value.

Conversion tocommunity()

Converts a value to Community.

Conversion todocument()

Converts a value to Document.

Conversion toemailrecipient()

Converts a value to email recipient.

Conversion tofolder()

Converts a value to Folder.

Conversion toknowledgecenter()

Converts a value to Knowledge Center.

Date and Time now()

Returns the current Date and Time as a serial number.

Date and Time today()

Returns the current day in GMT.

Smart Service a!docExtractionResult()

Retrieves results from a doc extraction run started by the Start Doc Extraction Smart Service.

Smart Service a!docExtractionStatus()

Retrieves the status of a doc extraction run started by the Start Doc Extraction Smart Service.

Evaluation a!refreshVariable()

The configuration for a specific local variable for use within a!localVariables(). When used within an interface, the value of the variable can be refreshed under a variety of conditions. When used outside of an interface, all refresh properties are ignored.

Evaluation bind()

Use in conjunction with the load function to bind getter and setter functions to a variable. When the variable is read, the getter function or rule will be called. When the variable is saved into, the writer returned by the setter function or rule will be called. The setter function must return a writer.

Evaluation a!save()

In interface saveInto parameters, updates the target with the given value. Use a!save for each item that you want to modify or alter in a saveInto parameter. This function has no effect when called outside of a component's saveInto parameter.

Informational a!keys()

Returns the keys of the provided map, dictionary, CDT, or record.

Informational a!listType()

Returns the list type number for a given type number.

Mathematical rand()

Returns a random number between 0 and 1 based on an even probability distribution, which is seeded by the transaction time.

People a!doesGroupExist()

Verifies whether a group with the specified group ID already exists in the environment.

People a!groupMembers()

Returns a DataSubset of group members of a given group.

People a!groupsByName()

Returns an array of groups with the given name, or an empty array if no group exists.

People a!groupsByType()

Returns a DataSubset of the groups of a given group type.

People a!isUserMemberOfGroup()

Identifies whether or not a user is a member of the specified groups. By default, this function returns true if the user is in at least one of the specified groups.

People getdistinctusers()

Retrieves users from a set of users and groups.

People getgroupattribute()

Retrieves the value of the specified group attribute for the given group.

People group()

Returns information for group.

People isusermemberofgroup 21r2()

Identifies whether or not a user belongs to a group.

People isusernametaken()

Verifies whether a user account with the specified username is already present.

People loggedInUser()

Returns the current user logged in to the application.

People supervisor()

Returns the supervisor of the user if they have one.

People togroup()

Converts a value to Group.

People topeople()

Converts a value to People.

People touser()

Converts a value to User.

People user()

Returns selected properties from a user's profile and preferences.

System a!aggregationFields()

Used to define a query against record data that performs an aggregation in a!queryRecordType(). Uses a!grouping() and a!measure() to define aggregate fields.

Scripting a!isNativeMobile()

Returns true if the interface is being viewed within the Appian for Mobile application. Returns false otherwise.

Scripting a!isPageWidth()
Scripting a!urlForTask()

This function returns the URL of a process task given the task ID.

Scripting averagetaskcompletiontimeforprocessmodel()

Returns the average elapsed time in days between task assignment and task completion for all assigned, accepted, and completed tasks in all processes started from a given process model.

Scripting averagetasklagtimeforprocessmodel()

Returns the average elapsed time in days between task assignment and task acceptance for all assigned, accepted, and completed tasks in processes for the specified process model.

Scripting averagetaskworktimeforprocessmodel()

Returns the average elapsed time in days between task acceptance and task completion for all accepted and completed tasks in processes for this process model.

Scripting community()

Returns the properties of a given community.

Scripting datetext()

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

Scripting document()

Returns property information for a document.

Scripting folder()

Returns a property of the requested folder.

Scripting isInDaylightSavingTime()

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

Scripting knowledgecenter()

Returns the properties of a knowledge center.

Scripting numontimeprocessesforprocessmodel()

This function eturns the number of active and completed processes of the specified process model that are on time (not past the deadline).

Scripting numontimetasksforprocessmodel()

Returns the number of tasks in process instances of the specified process model that are currently on time (if the task is still active) or were completed on time.

Scripting numoverdueprocessesforprocessmodel()

Returns the number of active and completed processes for the specified process model, which are past the deadline.

Scripting numoverduetasksforprocessmodel()

Returns the number of tasks in both active and completed process instances of the specified process model, which are currently overdue (if the task is still active) or were completed past their deadline.

Scripting numprocessesforprocessmodelforstatus()

Counts and returns the number of process instances with the specified status for the process model.

Scripting numtasksforprocessmodelforstatus()

Returns the number of tasks with the specified status in process instances of the process model.

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.

Scripting torecord()

Converts XML to a value of the given data type.

Scripting toxml()

Converts a value to its equivalent XML form.

Scripting urlforrecord()

This function allows you to return the URLs for one or more records or a record list view that can then be used in a link component.

Scripting urlwithparameters()

This function allows you to build a URL from an expression, using arrays of process and constant data.

Scripting userdate()

Identifies the date represented by year, month, and day and then interprets it in the user preferred calendar, converting it into a serial number.

Scripting userdatetime()

Interprets the given date and time in the user preferred calendar and converts it into a serial number.

Scripting userdatevalue()

Interprets the given date in the user preferred calendar and converts it into an equivalent serial number.

Scripting userday()

Returns the day of the month from the date or datetime specified in the user preferred calendar.

Scripting userdayofyear()

Returns the number of day within in a specified date/datetime.

Scripting userdaysinmonth()

Interprets the year/month specified in the user preferred calendar and returns the number of days in a that month.

Scripting useredate()

Returns the date that is the number of months before or after the given starting date in the user preferred calendar.

Scripting usereomonth()

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

Scripting userisleapyear()

This functions lets you know if a given year is a leap year in the user preferred calendar.

Scripting userlocale()

Returns the preferred locale of the given user or the site primary locale if the user doesn't have a preference set.

Scripting usermonth()

Returns the month from the specified date or datetime in the user preferred calendar.

Scripting usertimezone()

Returns the site primary timezone if the application is configured to override user preferences; otherwise it returns the preferred timezone of the given user or the site primary timezone if the user doesn't have a preference set.

Scripting userweekday()

Returns the day of the week of the specified date or datetime in the user preferred calendar.

Scripting userweeknum()

Returns the week number within the year for the given date or datetime in the user preferred calendar, using a given methodology.

Scripting useryear()

Returns the year from the date or datetime specified in the user preferred calendar.

Scripting webservicequery()

Invokes a web service configured by a WsConfig object with the supplied input data.

Scripting webservicewrite()

Returns a Writer that can be used as the setter of a variable created using the bind() function.

Scripting xpathdocument()

This function finds information in an XML document stored in Appian's document management system.

Scripting xpathsnippet()

This function finds information in an XML document provided as Text.

System a!applyComponents()

Calls a rule or function for each item in a list and supports the preservation of the local state on interfaces.

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!deployment()

Returns a specific property of a direct deployment.

System a!entityData()

Creates an Entity Data for use with a!writeToMultipleDataStoreEntities()

System a!entityDataIdentifiers()

Creates an EntityDataIdentifiers configuration for use with a!deleteFromDataStoreEntities().

System a!fromJson()

Converts a JSON string into an Appian value.

System a!fromJson 19r2()

Converts a JSON string into an Appian value.

System a!httpResponse()

Returns an HTTP Response object for use in a Web API.

System a!httpResponse 17r4()

Returns an HTTP Response object for use in a Web API.

System a!iconIndicator()

Returns the specified image from a list of standard indicator icons. Indicator icons can be used on interface within a document image.

System a!iconNewsEvent()

Returns the specified image from a list of standard news event icons in one of six colors: blue, green, gray, orange, purple, or red.

System a!integrationError()

Creates an integration error value. Use when configuring custom error handling for integration objects.

System a!jsonPath()

Finds information in a JSON string. JSONPath is used to navigate through elements and attributes in a JSON string.

System a!latestHealthCheck()

Returns the start time, run status, zip file, and report for the latest Health Check run.

System a!listViewItem()

Creates a value of type ListViewItem for use with record type definitions.

System a!pagingInfo()

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

System a!query()

Creates a Query object for use in the a!queryEntity() function.

System a!queryAggregation()

Creates an Aggregation object for use inside a Query object.

System a!queryAggregationColumn()

Creates an AggregationColumn object for use inside an Aggregation object.

System a!queryColumn()

Creates a Column object for use inside a Selection object.

System a!queryEntity()

Executes a query on a given data store entity and returns the result.

System a!queryEntity 18r3()

Executes a query on a given data store entity and returns the result.

System a!queryFilter()

Creates a value of type QueryFilter for use with a!pickerFieldRecords when defining filter options for expression-backed records, filtering a a!queryRecordType() or a!queryEntity() function call before any grouping or aggregation is computed, or using the a!recordData() function to define additional filters when referencing a set of records from a record type.

System a!queryLogicalExpression()

Creates a LogicalExpression object that determines the filtration to apply in Query object.

System a!queryProcessAnalytics()

Executes process reports and returns the resulting data.

System a!querySelection()

Returns a Selection object for use inside a Query object.

System a!recordFilterChoices()

Creates choices of a user filter for an expression-backed record.

System a!recordFilterDateRange()

Creates a user filter for a record list.

System a!recordFilterDateRange 20r2()

Creates a user filter for a record list. This is an older version of the a!recordFilterDateRange() function, which supports record type field references.

System a!recordFilterList()

Creates a user filter category for the record list.

System a!recordFilterListOption()

Creates a filter option for the a!recordFilterList() function.

System a!sentimentScore()

Returns a list of scores representing the emotional or subjective sentiment expressed in each of the provided text values, ranging from 1.0 (positive) to -1.0 (negative).

System a!sortInfo()

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

System a!toJson()

Converts a value into a JSON string.

System a!toJson 17r1()

Converts a value into a JSON string.

System a!toRecordIdentifier()

Matches record IDs with their record type to return a value of type Record Identifier for each record ID passed to the function.

System a!userRecordFilterList()

Returns the default user filters for the User record type. For use on the User record type only.

System a!userRecordIdentifier()

Returns a value of type Record Identifier for each user passed to the function.

System a!userRecordListViewItem()

Returns the default list view item for the User record type. For use on the User record type only.

System a!queryRecordType()

Executes a query on a given record type and returns the result.

System a!queryRecordType 20r4()

Executes a query on a given record type and returns the result. This is an older version of the a!queryRecordType() function, which has new functionality.

System a!recordData()

This function references a set of records from a record type and allows additional filtering in a read-only grid or chart that uses a record type as the source. When referencing one-to-many relationships in grid columns, you can filter, sort, and limit that related record set using the relatedRecordData parameter and the a!relatedRecordData() function.

System a!relatedRecordData()

References a one-to-many relationship defined on a record type and allows for additional filtering, sorting, and limiting of the related record set.

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!testRuleStatusForId()

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 currency()

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 dollar()

Converts a decimal number into a dollar value by effectively adding a dollar sign ($), a decimal point, and optional comma for every three digits preceding the decimal.

Text euro()

Converts a decimal number into a euro value by effectively adding a euro symbol (€), a decimal point, and optional comma for every three digits preceding the decimal.

Text pound()

Converts the number into pounds by effectively adding a pound symbol (£), a decimal point, and one comma for every three digits preceding the decimal.

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 yen()

Converts the number into yen by effectively adding a yen symbol (¥), a decimal point, and one comma for every three digits preceding the decimal.

Concatenate existing values

Goal: Create a new custom record field that concatenates existing record fields and displays them as one value.

In this example, we will use the concat() function to concatenate the record fields street, city, state, and zipCode from the Employee record type into a new custom record field called address:

1
2
3
4
concat(rv!record[recordType!employee.fields.street], ", ", 
rv!record[recordType!employee.fields.city],  ",  ", 
rv!record[recordType!employee.fields.state], " ", 
rv!record[recordType!employee.fields.zip]) 

Replace null values

Goal: Create a new custom record field that displays the null values in a record field as "N/A".

In this example, we'll create a new custom record field called cleanReference that displays any null values from the reference record field as "N/A". If the value is not null, then the record value will display.

1
a!defaultValue(rv!record[recordType!applicant.fields.reference], "N/A")

Use conditional logic with two record fields

Goal: Create a new custom record field with values based on the conditions of two existing fields.

In this example, we'll use the record fields urgency and supportLevel to determine a ticket's priority level. Based on the value of each field, the new custom record field will display values of "High", "Medium", or "Low".

1
2
3
4
5
6
7
8
9
10
11
12
13
if (and(
rv!record[recordType!case.fields.urgency] = 1,
rv!record[recordType!case.fields.supportLevel] = 3
	),
"High",
	if(and(
rv!record[recordType!case.fields.urgency] = 2,
rv!record[recordType!case.fields.supportLevel] = 2
	),
"Medium",
"Low"
)
)

Create percentages

Goal: Create a new custom record field that performs a calculation on existing values and displays the values as a percentage.

In this example, we'll calculate the return on investment (ROI) using the record fields revenue and totalExpenses. When you add this field in a report or grid, you can use rich text to add the percent sign. For example, rv!record[recordType!roi] & "%".

1
2
(rv!record[recordType!sales.fields.revenue] - rv!record[recordType!sales.fields.totalExpenses]) 
/ rv!record[recordType!sales.fields.totalExpenses] * 100

Perform arithmetic calculations

Goal: Create a new custom record field that uses arithmetic to calculate its values.

In this example, we'll use the record fields price, cost, and unitsSold to calculate the values for the new custom record field called profit.

1
2
(rv!record[recordType!Sales.fields.price] - rv!record[recordType!Sales.fields.cost])
* fv!record[recordType!Sales.fields.unitsSold]
Open in Github Built: Mon, Nov 29, 2021 (03:22:32 PM)

On This Page

FEEDBACK