input
stringlengths
14
1.47k
output
stringlengths
286
299k
instruction
stringclasses
1 value
Add Validations to an Inline Editable Grid Allows the user to change data directly in a grid, and validate a various entries. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user interaction requires a connection to the server. In this case, th...
a!localVariables( /* * local!employees is provided in this recipe as a way to start with hard-coded * data. However, this data is identical to the data created from the entity-backed * tutorial. Replace the hard-coded data with a query to the employee data store * entity and all of the employee records from...
Solve the following leet code problem
Problem Enforce that the user enters at least a certain number of characters in their text field, and also enforce that it contains the "@" character. This scenario demonstrates: How to configure multiple validations for a single component Type fewer than 5 characters and click "Submit". When testing offline, the for...
a!localVariables( local!varA, a!formLayout( label: "Example: Multiple Validation Rules on One Component", contents:{ a!textField( label: "Text", instructions: "Enter at least 5 characters, and include the @ character", value: local!varA, saveInto: local!varA, v...
Solve the following leet code problem
Add and Populate Sections Dynamically Add and populate a dynamic number of sections, one for each item in a CDT array. Each section contains an input for each field of the CDT. A new entry is added to the CDT array as the user is editing the last section to allow the user to quickly add new entries without extra click...
a) Fill in the first field and notice that a new section is added as you're typing. Add a few sections and click on the Remove button to remove items from the array Notable Implementation Details fv!isLast is being used to populate the instructions of the last text field as well as prevent the remove button from appea...
Solve the following leet code problem
Add, Edit, and Remove Data in an Inline Editable Grid Allow the user to change data directly in an inline editable grid This scenario demonstrates: How to use the grid layout component to build an inline editable grid How to allow users to add and remove rows in the grid How to pass in a default value initially and wh...
a!localVariables( /* * local!employess is provided in this recipe as a way to start with hard-coded * data. However, this data is identical to the data created from the entity-backed * tutorial. Replace the hard-coded data with a query to the employee data store * entity and all of the employee records from...
Solve the following leet code problem
Add, Remove, and Move Group Members Browser Problem Display the membership tree for a given group and provide users with the ability to add, remove, and move user members from a single interface.
Expression Once you have created your groups and users, you will be ready to begin constructing the interface and process by following the steps below: From the application, create a new interface called EX_addMoveRemoveUsers with the following inputs: ri!initialGroup (Group) - the group whose direct members display...
Solve the following leet code problem
Aggregate data and conditionally display it in a pie chart or grid. In this pattern, we will calculate the total number of employees in each department and display it in a pie chart and a read-only grid. Then, we'll use a link field to conditionally display each component. This design pattern is not recommended for o...
a!localVariables( /* This variable is set to true initially and is referenced in the showWhen parameters for the pie chart and inversely in the grid. The dynamic link at the end reverses this value on click. */ local!displayAsChart: true, /* Since we want to pass the data to the pie chart and the grid, ...
Solve the following leet code problem
Aggregate Data and Display in a Chart This expression uses direct references to the Employee record type, created in the Records Tutorial. If you've completed that tutorial in your environment, you can change the existing record-type references in this pattern to point to your Employee record type instead. https://doc...
Create this pattern You can easily create this pattern in design mode when you use a record type as the source of your chart. To create this pattern in design mode: Open a new or empty interface object. From the PALETTE, drag a Pie Chart component into the interface. From Data Source, select RECORD TYPE and search f...
Solve the following leet code problem
Aggregate data by multiple fields and display it in a stacked column chart. In this pattern, we will calculate the total number of employees for each title in each department and display it in a stacked column chart. How to aggregate data by multiple fields and display in a column chart
a) To create this pattern in design mode: https://docs.appian.com/suite/help/24.1/Chart_Configuration_Using_Records.html Open a new or empty interface object. From the PALETTE, drag a Column Chart component into the interface. From Data Source, select RECORD TYPE and search for the Employee record type. Under Primar...
Solve the following leet code problem
Aggregate Data on a Date or Date and Time Field Aggregate data, specifically the total number of employees by date.
a) To create this pattern in design mode: Open a new or empty interface object. From the PALETTE, drag a Bar Chart component into the interface. From Data Source, select RECORD TYPE and search for the Employee record type. Under Primary Grouping, select the startDate field. Click the edit icon next to the selected...
Solve the following leet code problem
Aggregate Data using a Filter and Display in a Chart Aggregate data, specifically the total number of employees for each title in the Engineering department, to display in a bar chart. This scenario demonstrates: How to aggregated data and display it in a bar chart How to filter the bar chart
a) To create this pattern in design mode: Open a new or empty interface object. From the PALETTE, drag a Bar Chart component into the interface. From Data Source, select RECORD TYPE and search for the Employee record type. Under Primary Grouping, select the title field. Under Measure, use the dropdown to select Count...
Solve the following leet code problem
Display a hierarchical data browser. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user interaction requires a connection to the server. This columns browser shows regions, account executives located in each region, and the customers associat...
Setup For this recipe, you'll need a hierarchical data set. Create the following three custom data types with corresponding fields. EXAMPLE_Region id (Number (Integer)) name (Text) EXAMPLE_AccountExec id (Number (Integer)) firstName (Text) lastName (Text) regionId (Number (Integer)) EXAMPLE_Customer id...
Solve the following leet code problem
Build a Wizard with Milestone Navigation Use the milestone component to show steps in a wizard. Configure links for each step in the milestone so that the user can move forward or return to any step. This scenario demonstrates: How to create a wizard using the showWhen parameter of an interface component How to ...
a!localVariables( local!employee:a!map( firstName:null, lastName:null, department:null, title:null, phoneNumber:null, startDate:null ), local!currentStep: 1, local!steps: {"Step 1", "Step 2", "Review"}, a!formLayout( label: "Example: Onboarding Wizard", contents:{ a!sectionLayout( contents...
Solve the following leet code problem
Build an Interface Wizard Divide a big form into sections presented one step at a time with validation. Wizards should be used to break up a large form into smaller steps rather than activity-chaining. Users can step back and forth within a wizard without losing data in between steps. All the fields must be valid befor...
SAIL code: a!localVariables( local!employee:a!map( firstName:null, lastName:null, department:null, title:null, phoneNumber:null, startDate:null ), local!currentStep: 1, a!formLayout( label: "Example: Onboarding Wizard", contents:{ a!columnsLayout( columns:{ a!columnLayout( ...
Solve the following leet code problem
Conditionally hide a column in a read-only grid when all data for that column is a specific value. Use Case You can configure a read-only grid to conditionally hide a grid column, show a grid column, or both when the user selects a filter. This interface expression pattern demonstrates how to use a!gridField() to con...
The expression pattern below shows you how to: Conditionally hide a column in a read-only grid based on the user's interaction. Use a!queryFilter() to query the record type to return a datasubset that matches the filter value selected. Use record type field references, recordType!<record type name>.fields.<field name...
Solve the following leet code problem
Configure Buttons with Conditional Requiredness Present two buttons to the end user and only make certain fields required if the user clicks a particular button This scenario demonstrates: How to use validation groups to evaluate particular fields on a form How to use the requiredMessage parameter to set custom r...
a!localVariables( /* * All of these local variables could be combined into the employee CDT and passed into * a process model via a rule input */ local!firstName, local!lastName, local!department, local!title, local!phoneNumber, local!startDate, /* * local!isFutureHire is a placeholder var...
Solve the following leet code problem
Configure Cascading Dropdowns Show different dropdown options depending on the user selection. This scenario demonstrates: How to setup a dropdown field's choice labels and values based of another dropdown's selection. How to clear a child dropdown selection when the parent dropdown value changes.
a!localVariables( local!selectedDepartment, local!selectedTitle, /* * Hardcoded values are stored here through the choose function. Typically * this data would live with the department in a lookup value. In that case * local!selectedDepartment would act as a filter on that query to bring * bac...
Solve the following leet code problem
Configure a Boolean Checkbox Configure a checkbox that saves a boolean (true/false) value, and validate that the user selects the checkbox before submitting a form. This scenario demonstrates: How to configure a checkbox field so that a single user interaction records a true or false value
a!localVariables( local!userAgreed, a!formLayout( label:"Example: Configure a Boolean Checkbox", contents:{ a!checkboxField( label: "Acknowledge", choiceLabels: {"I agree to the terms and conditions."}, choiceValues: {true}, /* If local!userAgreed is false, set the valu...
Solve the following leet code problem
Configure a Chart Drilldown to a Grid Displays a column chart with aggregate data from a record type and conditionally shows a grid with filtered records when a user selects a column on the chart. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on...
a!localVariables( local!selection, a!sectionLayout( contents: { a!columnChartField( label: "All Cases", data: a!recordData( recordType: recordType!Case, filters: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( ...
Solve the following leet code problem
Configure a Chart to Grid Toggle Display a column chart with a toggle to display an alternate grid view of the data. Display a chart with the number of tickets reported each month internally and from customers. Then add a grid to display the same data. Finally, add a link so that a user may toggle between the chart and...
a!localVariables( local!ticketData:{ a!map( month:"January", internalTickets:32, customerTickets:41 ), a!map( month:"February", internalTickets:16, customerTickets:38 ), a!map( month:"March", internalTickets:21, customerTickets:37 ), a!map( month:"April", internalTickets:31, customerTickets...
Solve the following leet code problem
Configure a Dropdown Field to Save a CDT When using a dropdown to select values from the database, or generally from an array of CDT values, configure it to save the entire CDT value rather than just a single field. This scenario demonstrates: How to configure a dropdown component to save a CDT value. Notable imp...
a!localVariables( local!foodTypes: { a!map( id: 1, name: "Fruits" ), a!map( id: 2, name: "Vegetables" ) }, local!selectedFoodType, a!formLayout( label: "Example: Dropdown with CDT", contents: { a!dropdownField( label: "Food Type", instructions: "Value saved: " & local!selec...
Solve the following leet code problem
Configure a Dropdown with an Extra Option for Other Show a dropdown that has an "Other" option at the end of the list of choices. If the user selects "Other", show a required text field. This scenario demonstrates: How to configure a dropdown with an appended value How to conditionally show a field based the selectio...
a) a!localVariables( local!departments:{"Corporate","Engineering","Finance","HR","Professional Services"}, /* * You need separate variables to temporarily store the dropdown selection * (local!selectedDepartment) and the value entered for "Other" (local!otherChoice). */ local!selectedDepartment, local!ot...
Solve the following leet code problem
Configure an Array Picker Allow users to choose from a long text array using an auto-completing picker. Also, allow users to work with user-friendly long labels but submit machine-friendly abbreviations.
The main expression uses a supporting rule, so let's create that first. ucArrayPickerFilter: Scans labels that match the text entered by the user and returns a DataSubset for use in the picker component. Create expression rule ucArrayPickerFilter with the following rule inputs: filter (Text) labels (Text Array) id...
Solve the following leet code problem
Configure an Array Picker with a Show All Option Allow users to choose from a long text array using an autocompleting picker, but also allow them to see the entire choice set using a dropdown. Dropdowns with many choices can be a little unwieldy, but when there is doubt about even the first letters of an option they ca...
Setup: The main expression uses a supporting rule, so let's create that first. ucArrayPickerFilter: Scans labels that match the text entered by the user and returns a DataSubset for use in the picker component. Create expression rule ucArrayPickerFilter with the following rule inputs: filter (Text) labels (Text...
Solve the following leet code problem
Define a Simple Currency Component Show a text field that allows the user to enter dollar amounts including the dollar symbol and thousand separators, but save the value as a decimal rather than text. Additionally, always show the dollar amount with the dollar symbol. This scenario demonstrates: How to configure an in...
a!localVariables( local!amount, a!textField( label:"Amount in Text", /* Instructions show the saved datatype*/ instructions: "Type of local!amount: " & typename(typeof(local!amount)), value: a!currency( isoCode: "USD", value: local!amount, format: "SYMBOL" ), /* Instead of...
Solve the following leet code problem
Delete Rows in a Grid Delete one or more rows of data in a read-only grid. This scenario demonstrates how to remove rows from a grid. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user interaction requires a connection to the server.
When the user clicks the REMOVE button, the selected row IDs are added to a local variable. Any ID in that variable is filtered out of the grid using a!queryFilter() within the a!recordData() function. Note that the source rows are not actually removed; the rows are just visibly removed from the grid. To actually remov...
Solve the following leet code problem
Disable Automatic Refresh After User Saves Into a Variable This scenario demonstrates: How to disable the automatic recalculation of a variable's default value once a user has edited that variable directly
a!localVariables( local!startDate: today(), local!endDateEdited: false, local!endDate: a!refreshVariable( value: local!startDate + 7, refreshOnReferencedVarChange: not(local!endDateEdited) ), { a!dateField( label: "Start Date", value: local!startDate, saveInto: local!startDate ), ...
Solve the following leet code problem
Display Last Refresh Time This scenario demonstrates how to enable, track, and display the last updated time when the data in the grid refreshed on an interval, and due to a user interaction. Use this pattern when you want to let users know how fresh the data is and when it was last refreshed.
Solution explanation : This pattern works by putting the recordData() function into a local variable, instead of directly into the grid, allowing the refresh variable in local!lastUpdatedAt to watch it. We use recordData() in order to take advantage of using record data in a grid which enables a refresh button. The f...
Solve the following leet code problem
Display Multiple Files in a Grid. Show a dynamic number of files in a grid and edit certain file attributes. For this recipe, were are giving our users the ability to update the file name, description, and an associative field for the file "Category". However, designers can modify this recipe to modify various types o...
Solution explanation : Before we can see this recipe in the live view, we will need to create a Constant that holds an array of documents. To do this: Upload a few files into Appian Create a constant of type Document named UC_DOCUMENTS and select the multiple checkbox. Select the files you just uploaded as t...
Solve the following leet code problem
Display Processes by Process Model with Status Icons. Use an interface to display information about instances of a specific process model. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user interaction requires a connection to the server. T...
Setup For this recipe, you'll need a constant pointing to a process report and a process model that has been at least started a few times. If you don't have a process model, you can follow the Process Modeling Tutorial. Once you have some processes, you can follow these steps to create a process report with the defaul...
Solve the following leet code problem
Display a User's Tasks in a Grid With Task Links. Display the tasks for a user in a Read-Only Grid and allow them to click on a task to navigate to the task itself. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user interaction requires a con...
Setup For this recipe, you'll need a constant pointing to a task report. Follow these steps to create a task report with the default columns and associate it with a constant: In the Build view of your application, click NEW > Process Report. Select Create from scratch. Name the report Tasks for User A, and provide a...
Solve the following leet code problem
Dynamically Show Sales by Product Category Compared to Total Sales. This pattern illustrates how to create an area chart that dynamically displays sales generated by product category compared to total sales. This pattern also provides a sample scenario to show how you can take common business requirements and quickly t...
Setup This pattern uses data from the Appian Retail application, available for free in Appian Community Edition. To follow along with this pattern, log in to Appian Community to request the latest Appian Community Edition site. If you do not see the Appian Retail application available in your existing Appian Community ...
Solve the following leet code problem
Expand/Collapse Rows in a Tree Grid Create a grid that shows hierarchical data and allows users to dynamically expand and collapse rows within the grid. This scenario demonstrates: How to use the rich text display component inside an editable grid to create a tree grid. How to use a rich text display component to cr...
SetupCopy link to clipboard For this recipe, you'll need two Data Store Entities that are populated with data: Create a custom data type called PurchaseRequest with the following fields: id (Number (Integer)) summary (Text) Designate the id field as the primary key and set to generate value. See also: Primary Keys Sav...
Solve the following leet code problem
Filter the Data in a Grid Configure a user filter for your read-only grid that uses a record type as the data source. When the user selects a value to filter by, update the grid to show the result. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based ...
Filter the rows in a grid User filters on your read-only grid allow users to select a filter and return only the records that match the filter value. When you use a record type as the data source for your read-only grid, there are two ways to configure user filters on the grid. In design mode, you can quickly and easi...
Solve the following leet code problem
Filter the Data in a Grid Using a Chart. Display an interactive pie chart with selectable sections so that a user may filter the results in a grid. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user interaction requires a connection to the se...
Create this patternCopy link to clipboard This recipe uses references to record types and record fields. To use this recipe, you will need to update the references to record types and record fields in your application. SAIL Code: a!localVariables( local!chartDataSubset: a!queryRecordType( recordType: recordTy...
Solve the following leet code problem
Format the User's Input Format the user's input as a telephone number in the US and save the formatted value, not the user's input. This expression uses the text() function to format the telephone number. You may choose to format using your own rule, so you would create the supporting rule first, and then create an int...
SAIL Code: a!localVariables( local!telephone, a!textField( label: "Employee Telephone Number", instructions: "Value saved: " & local!telephone, value: local!telephone, saveInto: a!save( local!telephone, text(save!value, "###-###-####;###-###-####") ) ) )
Solve the following leet code problem
Limit the Number of Rows in a Grid That Can Be Selected Limit the number of rows that can be selected to an arbitrary number. This scenario demonstrates: How to configure grid selection in a Read-Only Grid. How to limit selection to an arbitrary number. How to remove selections without clicking through pages.
a!localVariables( local!selection, /* This is the maximum number of rows you can select from the grid. */ local!selectionLimit: 2, /*This variable would be used to pass the full rows of data on the selected items out of this interface, such as to a process model. */ local!selectedEmployees, { a!columnsL...
Solve the following leet code problem
Make a Component Required Based on a User Selection Make a paragraph component conditionally required based on the user selection. This scenario demonstrates: How to configure a required parameter of one component based off the interaction of another
a!localVariables( local!isCritical, local!phoneNumber, a!formLayout( label: "Example: Conditionally Required Field", contents:{ a!columnsLayout( columns:{ a!columnLayout( contents:{ a!checkboxField( label: "Is Mission Critical", ...
Solve the following leet code problem
Offline Mobile Task Report Display a task report for a user that will work in Appian Mobile, even when the user is offline.
You can create offline mobile tasks that users can access on Appian Mobile even if they don't have an internet connection. To display these tasks in a task report, you'll need to follow the Design Best Practices for Offline Mobile. Specifically, you will need to: Load the data you need at the top of the interface. G...
Solve the following leet code problem
Percentage of Online Sales This pattern illustrates how to calculate the percent of sales generated from online orders and display it in a gauge component. This pattern also provides a sample scenario to show how you can take common business requirements and quickly turn them into a report. You'll notice that this pa...
ScenarioCopy link to clipboard Account managers at the Appian Retail company want to know how much of their 2021 sales were generated from online sales so they can determine if they need to do more online advertising, or hire more in-person staff. To show the percentage of online sales, you’ll use the pattern on this ...
Solve the following leet code problem
Refresh Data After Executing a Smart Service. This scenario demonstrates: How to force a variable to be refreshed after a smart service is executed to get the latest data.
Sail Code expression : a!localVariables( local!updateCounter: 0, local!employee: a!refreshVariable( value: a!queryEntity( entity: cons!EMPLOYEE_ENTITY, query: a!query( logicalExpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter(fiel...
Solve the following leet code problem
Refresh Data Using a Refresh Button This scenario demonstrates how to force a variable to be refreshed even if its dependencies haven't changed. Notable implementation detailsCopy link to clipboard The Refresh button increments a counter to make sure the value of local!refreshCounter always changes. Using a boolean f...
a!localVariables( local!refreshCounter: 0, local!startIndex: a!refreshVariable( value: 1, refreshOnVarChange: local!refreshCounter ), local!pagingInfo: a!pagingInfo(local!startIndex, 5), local!employees: a!refreshVariable( value: a!queryEntity( entity: cons!EMPLOYEE_ENTITY, query: a!qu...
Solve the following leet code problem
Refresh Until Asynchronous Action Completes. This scenario demonstrates: How to enable a refresh interval after an asynchronous action is started and disable it once the asynchronous action is complete. Notable implementation detailsCopy link to clipboard The refreshInterval parameter can be set based on the current v...
=a!localVariables( local!testRunId, local!error, local!testRunStatus: a!refreshVariable( value: if(isnull(local!testRunId), null, a!testRunStatusForId(local!testRunId)), refreshInterval: if(or(isnull(fv!value), fv!value = "COMPLETE"), null, 0.5) ), local!testRunResults: if( local!testRunStatus = "...
Solve the following leet code problem
Sales by Country and Currency This pattern illustrates how to create two different charts. One chart shows sales (calculated in US dollars) by country and the currency paid. The other shows sales by currency type, comparing the number of sales paid in US dollars versus the local currency. This pattern also provides a s...
SetupCopy link to clipboard This pattern uses data from the Appian Retail application, available for free in Appian Community Edition. To follow along with this pattern, log in to Appian Community to request the latest Appian Community Edition site. If you do not see the Appian Retail application available in your ex...
Solve the following leet code problem
Sales by Region This pattern illustrates how to create a bar chart that shows sales per sales region. This pattern also provides a sample scenario to show how you can take common business requirements and quickly turn them into a report. You'll notice that this pattern provides more than just an expression, it shows y...
{ a!barChartField( data: 'recordType!{c25947c0-2230-41cb-86a6-bd86d14d0af9}Sales Region', config: a!barChartConfig( primaryGrouping: a!grouping( field: 'recordType!{c25947c0-2230-41cb-86a6-bd86d14d0af9}Sales Region.relationships.{0ea75675-bc93-491c-8cc2-3c74668c96d3}country.fields.{85846423-5eb5...
Solve the following leet code problem
Save a User's Report Filters to a Data Store Entity. Allow a user to save their preferred filter on a report and automatically load it when they revisit the report later. This scenario demonstrates: How to use the Write to Data Store smart service from a report.
a!localVariables( local!persistedFilterData: a!queryEntity( entity: cons!CSRS_FILTER_ENTITY, query: a!query( filter: a!queryFilter(field: "username", operator: "=", value: loggedInUser()), pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1) ), fetchTotalCount: true ), local!persisted...
Solve the following leet code problem
Searching on Multiple Columns. Display a grid populated based on search criteria specified by end users. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user interaction requires a connection to the server. Tip: If the data source for a read-o...
a!localVariables( /* In a real app, these values should be held in the database or in a constant. */ local!allDepartments: {"Corporate", "Engineering", "Finance", "HR", "Professional Services", "Sales"}, /* These local variables store filter values. */ local!lastName, local!title, local!department, /* The...
Solve the following leet code problem
Set a Numeric Rating Using Rich Text Icons Save a numeric score using a set of clickable rich text icons. This example uses a familiar set of star icons capture a user's sentiment. To see how to display an aggregated set of rankings rating, see the Show a Numeric Rating as Rich Text Icons recipe. This scenario demons...
a!localVariables( local!rating: 0, local!totalStars: 10, a!richTextDisplayField( value: { a!foreach( items: enumerate(local!totalStars) + 1, expression: { a!richTextIcon( icon: if( fv!index <= local!rating, "star", "star-o" ...
Solve the following leet code problem
Set the Default Value Based on a User Input. Set the default value of a variable based on what the user enters in another component. This example only applies when the default value is based on the user's input in another component. See Set the Default Value of an Input on a Task Form recipe when the default value mus...
SAIL Code : a!localVariables( local!username, local!email, local!emailModified: false, a!formLayout( label: "Example: Default Value Based on User Input", contents: { a!textField( label: "Username", instructions: "Value saved: " & local!username, value: local!username, saveInto: { ...
Solve the following leet code problem
Set the Default Value of CDT Fields Based on a User Input. Set the value of a CDT field based on a user input.
Sail Code begin: a!localVariables( local!myCdt: 'type!{http://www.appian.com/ae/types/2009}LabelValue'(), a!formLayout( label: "Example: Default Value Based on User Input", instructions: "local!myCdt: " & local!myCdt, contents: { a!textField( label: "Label", instructions: "Value saved: " & local...
Solve the following leet code problem
Set the Default Value of an Input on a Start Form. Display a default value in some form inputs on a start form, and save the value into the process when submitting.
StepsCopy link to clipboard Create an interface with one rule input called title (Text) and another one called date (Date). Enter the following definition for the interface, and save it as sailRecipe. In your process model, on the process start form enter the name of your interface in the search box and select it Click...
Solve the following leet code problem
Set the Default Value of an Input on a Task Form. Display a default value in some form inputs on a task form, and save the value to process when submitting.
StepsCopy link to clipboard Create an interface with one rule input called title (Text). Enter the following definition for the interface, and save it as sailRecipe. In your process model, drag a User Input Task on the canvas. On the forms tab of that activity, enter the name of your interface in the search box and sel...
Solve the following leet code problem
Show Calculated Columns in a Grid. Display calculated values in columns in a grid. Use CaseCopy link to clipboard You can configure a read-only grid to display calculated columns. These columns differ from the columns returned from your data source. Calculated columns allow you to combine data from two or more column...
The expression pattern below shows you how to: Concatenate two separate data points to create a single value. Use the Retrieve Next Anniversary Date function recipe to format a date and improve its readability. Sail code : a!gridField( label: "Performance Review Schedule", labelPosition: "ABOVE", data: rec...
Solve the following leet code problem
Show a Numeric Rating as Rich Text Icons Dynamically show a star rating based on a numeric score. This example uses a familiar set of star icons to display an aggregated value taken from many previous rating. To see how to capture and display an individual rating, see the Set a Numeric Rating Using Rich Text Icons rec...
a!localVariables( local!score: 5.88, local!limit: 10, a!richTextDisplayField( value: { a!forEach( items: enumerate(local!limit) + 1, expression: a!richTextIcon( color: "ACCENT", icon: if( fv!index <= local!score, "star", if( ...
Solve the following leet code problem
Showing Validation Errors that Aren't Specific to One Component Alert the user about form problems that aren't specific to one component, showing the message only when the user clicks "Submit". In this case, there are two fields and although neither are required, at least one of them must be filled out to submit the fo...
a!localVariables( local!phone, local!email, a!formLayout( label: "Example: Showing Form Errors on Submission", contents:{ a!textField( label: "Phone Number", value: local!phone, saveInto: local!phone ), a!textField( label: "Email Address", value: l...
Solve the following leet code problem
Sync Records using a Record Action Configure a record action with the Sync Records smart service so users can sync a set of records on demand. This pattern focuses on re-syncing (or refreshing) a set of records that already exist in Appian. It also provides a sample scenario to show why you might use this pattern in yo...
SetupCopy link to clipboard This pattern uses data from the Appian Retail application, available for free in Appian Community Edition. To follow along with this pattern, log in to Appian Community to request the latest Appian Community Edition site. If you do not see the Appian Retail application available in your exi...
Solve the following leet code problem
Top Customers and Their Latest Order. This pattern illustrates how to create a grid that shows the top paying customers, their latest order, and their total sum of sales. This pattern also provides a sample scenario to show how you can take common business requirements and quickly turn them into a report. You'll noti...
{ a!gridField( label: "Top Customers in 2021", labelPosition: "ABOVE", data: a!recordData( recordType: 'recordType!Customer', relatedRecordData: { a!relatedRecordData( relationship: 'recordType!}Customer.relationships.order', limit: 1, sort: a!sortInfo( ...
Solve the following leet code problem
Total Orders Compared to Orders Purchased with Promo Codes. This pattern illustrates how to create a column chart that compares the number of total orders and the number of orders that had at least one item purchased with a promo code. This pattern also provides a sample scenario to show how you can take common busines...
{ a!columnChartField( data: a!recordData( recordType: 'recordType!Order', filters: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: 'recordType!Order.fields.orderDate', operator: "between", value: { ...
Solve the following leet code problem
Track Adds and Deletes in Inline Editable Grid. In an inline editable grid, track the employees that are added for further processing in the next process steps. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user interaction requires a connect...
a!localVariables( /* In a real app, these values should be held in the database or in a constant */ local!departments: { "Corporate", "Engineering", "Finance", "HR", "Professional Services", "Sales" }, /* * local!employees is provided in this recipe as a way to start with hard-coded * data. However, this da...
Solve the following leet code problem
Update an Entity-Backed Record from its Summary View. This scenario demonstrates how to use the Write to Data Store smart service to update an entity-backed record in response to a user interaction
a!localVariables( /* In a real app, these values should be held in the database or in a constant */ local!departments: { "Corporate", "Engineering", "Finance", "HR", "Professional Services", "Sales" }, /* * Employee data is being passed in via a query and converted * back to CDT. * * To use your date...
Solve the following leet code problem
Use Links in a Grid to Show More Details and Edit Data. Allow end users to click a link in a read-only grid to view the details for the row, and make changes to the data. The data available for editing may include more fields than are displayed in the grid. This design pattern is not recommended for offline interfaces ...
a!localVariables( /* We load the employee data into this variable. If you are populating this variable with a query, you would put .data at the end before passing it to the grid. */ local!employees: { a!map( id: 11, name: "Elizabeth Ward", dept: "Engineering", role: "Senior Engineer", team:...
Solve the following leet code problem
Use Links in a Grid to Show More Details and Edit Data in External System. Allow end users to click a link in a read-only grid to view the details for the row, and make changes to the data. This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user i...
SetupCopy link to clipboard Unlike the previous grid examples, this recipe retrieves the values for the local!employees array from an external system via a web service. It does so by using the bind() function, which associates two rules or functions with a load() local variable: one that gets the data from the externa...
Solve the following leet code problem
Use Selection For Bulk Actions in an Inline Editable Grid. Allow the user to edit data inline in a grid one field at a time, or in bulk using selection. This scenario demonstrates: How to use the grid layout component to build an inline editable grid How to use selection to enable bulk actions How to make a cell condi...
SetupCopy link to clipboard This example makes use of a custom data type. Create a PrItem custom data type with the following fields: id (Number (Integer)) summary (Text) qty (Number (Integer)) unitPrice (Number (Decimal)) dept (Text) due (Date) decision (Text) reason (Text) Now that we've created the supporting dat...
Solve the following leet code problem
Use Validation Groups for Buttons with Multiple Validation Rules. This scenario demonstrates how to use validation groups in an interface.
a!localVariables( /* * All of these local variables could be combined into the employee CDT and passed into * a process model via a rule input */ local!firstName, local!lastName, local!department, local!title, local!phoneNumber, local!startDate, /* * local!isFutureHire is a placeholder vara...
Solve the following leet code problem
Use a Filter to Adjust Chart Reference Lines. Using a dropdown, filter the results of a data set while also adjusting a chart reference line. This scenario demonstrates: 1.How to conditionally adjust the value of a chart reference line to account for differing limits on a set of data. 2.How to configure multiple chart ...
a!localVariables( local!selectedDepartment: "Engineering", local!data: { a!map(department: "Engineering", quarter: "2015-Q1", spent: 15804), a!map(department: "Engineering", quarter: "2015-Q2", spent: 13432), a!map(department: "Engineering", quarter: "2015-Q3", spent: 23400), a!map(department: "Engi...
Solve the following leet code problem
Use the Gauge Fraction and Gauge Percentage Configurations. This recipe provides a common configuration of the Gauge Component using a!gaugeFraction() and a!gaugePercentage(), and includes a walkthrough that demonstrates the benefits of using design mode when configuring the gauge component.
WalkthroughCopy link to clipboard In this scenario, we are creating a gauge to show that a user has completed 5 of their 11 tasks. When adapting this pattern for your application, you will likely either query for the number of tasks completed and total tasks, or use a rule input. SetupCopy link to clipboard Let's st...
Solve the following leet code problem
Use the Write Records Smart Service Function on an Interface. Allow the user to publish several rows of data to a database table with the a!writeRecords() smart service function. Note: This expression uses direct references to the Employee record type, created in the Records Tutorial. If you've completed that tutoria...
SetupCopy link to clipboard For this pattern, we'll create a record type with data sync enabled, and then use the a!writeRecords() smart service function in a basic interface to populate the record type's data source with example data. We'll use the Appian Tutorial application as a starting point. To set up this patte...
Solve the following leet code problem
Use the Write to Data Store Entity Smart Service Function on an Interface. Allow the user to publish several rows of data to a table through the a!writeToDataStoreEntity() smart service function. Follow this pattern to create example data and supporting objects to use with other interface patterns (including those that...
SetupCopy link to clipboard Tip: Try to follow these setup steps verbatim. However, if you do need to adjust any of the values, you'll need to ensure that you make the necessary modifications to interface patterns that depend on this data. For this pattern, we'll use a custom data type (CDT), then a smart service fun...
Solve the following leet code problem
Year-Over-Year Sales Growth. ScenarioCopy link to clipboard Sales executives at the Appian Retail company want to know how their sales in 2021 compared to their sales in 2020 so they can see, overall, how business is doing. Specifically, they need to know if business has grown over the year before they decide to expand...
SetupCopy link to clipboard This pattern uses data from the Appian Retail application, available for free in Appian Community Edition. To follow along with this pattern, log in to Appian Community to request the latest Appian Community Edition site. If you do not see the Appian Retail application available in your exi...
Solve the following leet code problem
Function Recipes. This page lists a collection of function recipes you can use throughout the Appian application. Similar to a cookbook, it shows the individual ingredients that go into creating an expression using Appian functions, the order in which to combine them, and tips on when to use them or modify for prefere...
Date/time results Retrieve next anniversary date Use case You want to retrieve next year's anniversary date based on a start date, such as an employee's hire date of 02/05/2011. Ingredients if() today() date() day() month() year() Inputs start (date) Expression if( and(month(ri!start) <= month(today()),day(ri!...
Solve the following leet code problem
Query Recipes. This provides a set of recipes designed to show how you can use the a!queryRecordType(), a!queryRecordByIdentifier(), and a!queryEntity() functions to retrieve, aggregate, filter, and sort data. Recipes querying records
SetupCopy link to clipboard To work with a common set of data, we will use the Appian Retail application, available for free in Appian Community Edition. To follow along with this pattern, log on to Appian Community and request the latest Appian Community Edition site. The sample expressions provided in each recipe ca...
Solve the following leet code problem
all appian functions
Name | Description | Syntax | Example | Result | Compatibility | ---|---|---|---|---|---| Name Description Syntax Example Result Compatibility ---|---|---|---|---|---| ArrayUsed within your expressions to manipulate, insert, and/or select values from arrays. | a!flatten() | Converts an array that contains other arrays ...
Solve the following leet code problem
Billboard Layout Component a!billboardLayout( backgroundMedia, backgroundColor, showWhen, height, marginBelow, overlay, accessibilityText, marginAbove, backgroundMediaPositionHorizontal, backgroundMediaPositionVertical )
a!billboardLayout( backgroundMedia, backgroundColor, showWhen, height, marginBelow, overlay, accessibilityText, marginAbove, backgroundMediaPositionHorizontal, backgroundMediaPositionVertical ) Displays a background color, image, or video with optional overlay content. ParametersCopy link to clipboard Name Keyword Ty...
Solve the following leet code problem
interface component : Box Layout
a!boxLayout( label, contents, style, showWhen, isCollapsible, isInitiallyCollapsed, marginBelow, accessibilityText, padding, shape, marginAbove, showBorder, showShadow, labelSize, labelHeadingTag ) Displays any arrangement of layouts and components within a box on an interface. ParametersCopy link to clipboard Name K...
Solve the following leet code problem
Interface component. Card Layout Component
a!cardLayout( contents, link, height, style, showBorder, showShadow, tooltip, showWhen, marginBelow, accessibilityText, padding, shape, marginAbove, decorativeBarPosition, decorativeBarColor ) Displays any arrangement of layouts and components within a card on an interface. Can be styled or linked. ParametersCopy lin...
Solve the following leet code problem
Interface COMPONENT. Columns Layout.
FunctionCopy link to clipboard a!columnsLayout( columns, alignVertical, showWhen, marginBelow, stackWhen, showDividers, spacing, marginAbove ) Displays any number of columns alongside each other. On narrow screens and mobile devices, columns are stacked. See also: Responsive Design Columns and Side By Side design gu...
Solve the following leet code problem
Interface Components. Form Layout
FunctionCopy link to clipboard a!formLayout( label, instructions, contents, buttons, validations, validationGroup, skipAutoFocus, showWhen ) Displays any arrangement of layouts and components beneath a title and above buttons. Use this as the top-level layout for start and task forms. See also: Dashboard, Columns Pa...
Solve the following leet code problem
Interface Components Header Content Layout Component
FunctionCopy link to clipboard a!headerContentLayout( header, contents, showWhen, backgroundColor, contentsPadding, isHeaderFixed ) Displays any arrangement of layouts and components beneath a billboard or card header that is flush with the edge of the page. Similar to a form layout, this is a top-level layout and can...
Solve the following leet code problem
Interface Components. Section Layout Component
FunctionCopy link to clipboard a!sectionLayout( label, contents, validations, validationGroup, isCollapsible, isInitiallyCollapsed, showWhen, divider, marginBelow, accessibilityText, labelIcon, iconAltText, labelSize, labelHeadingTag, labelColor, dividerColor, dividerWeight, marginAbove ) This layout requires Appian f...
Solve the following leet code problem
Interface Components. Side By Side Layout.
FunctionCopy link to clipboard a!sideBySideLayout( items, alignVertical, showWhen, spacing, marginBelow, stackWhen, marginAbove ) Displays components alongside each other. See also: Side By Side Item Responsive Design Side By Side and Columns design guidance Side By Side design guidance ParametersCopy link to clipbo...
Solve the following leet code problem
LAYOUT ELEMENTS: Bar Overlay
FunctionCopy link to clipboard a!barOverlay( position, contents, showWhen, style, padding ) Displays a horizontal bar overlay for use in billboard layout. See also: Billboard, Billboard layout design guidance ParametersCopy link to clipboard Name Keyword Types Description Position position Text Determines where t...
Solve the following leet code problem
Column Layout
FunctionCopy link to clipboard a!columnLayout( contents, width, showWhen ) Displays a column that can be used within the columns layout. See also: Columns Columns and Side By Side design guidance Columns layout design guidance ParametersCopy link to clipboard Name Keyword Types Description Contents contents Any Ty...
Solve the following leet code problem
Column Overlay
FunctionCopy link to clipboard a!columnOverlay( alignVertical, position, width, contents, showWhen, style, padding ) Displays a vertical column overlay for use in billboard layout. See also: Billboard ParametersCopy link to clipboard Name Keyword Types Description Vertical Alignment alignVertical Text Determines ...
Solve the following leet code problem
Full Overlay
FunctionCopy link to clipboard a!fullOverlay( alignVertical, contents, showWhen, style, padding ) Displays an overlay that covers the entire billboard layout. See also: Billboard, Billboard layout design guidance ParametersCopy link to clipboard Name Keyword Types Description Vertical Alignment alignVertical Text ...
Solve the following leet code problem
Side By Side Item
FunctionCopy link to clipboard a!sideBySideItem( item, width, showWhen ) Displays one item within a side by side layout. See also: Side By Side Layout Side By Side and Columns design guidance Side By Side design guidance ParametersCopy link to clipboard Name Keyword Types Description Item item Any Type The compon...
Solve the following leet code problem
Design Objects. Applications contain a set of objects that function together to meet one or several business use cases. Applications allow these objects to be deployed from one environment to another. When an object is created, it is assigned a universally unique identifier (UUID). This internal (hidden) property is ...
Data objectsCopy link to clipboard Record types, data stores and custom data types (CDTs) are all data-centric objects. Their icons will appear orange in grids and other displays in Appian Designer. Data StoreData StoreCopy link to clipboard A data store is a reference to an external relational database that is used t...
Solve the following leet code problem
Appian Data Types The data (process variables, node inputs, node outputs, rule inputs, data store entities, or constants) used by Appian must conform to certain data types. Appian data types can be one of the system types or a custom data type built from an XML Schema Definition (XSD), Java object, or imported from a ...
Any TypeCopy link to clipboard The Any Type is a generic data type only available for use as an expression input for rules and certain expression functions, such as the if() function. It accepts data of any data type. Data is stored in variables of this type by mapping an existing variable, rule, constant, or expressi...
Solve the following leet code problem
The button is record field action and the grid is selectable. I would like to display the button in that row only which is selected. Can anyone please help me how to achieve this.
{ a!localVariables( local!employees: { {id: 1, name: "Elizabeth Ward", dept: "Engineering", role: "Senior Engineer", team: "Front-End Components", pto: 15, startDate: today()-500}, {id: 2, name: "Michael Johnson", dept: "Finance", role: "Payroll Manager", team: "Accounts Pay...
Solve the following leet code problem
Code: a!forEach(pv!addedResearchItems_cdt, if( and(rule!APN_isBlank(index(fv!item,"id",{})),rule!APN_isBlank(fv!item.url)), cast('type!{urn:com:appian:types:gngp}GNGP_RESEARCH_ITEM',updatecdt(fv!item,{file_name: if(not(isnull(fv!item.file_name)), fv!item.file_name, if(not(isnull(fv!item.document_id)),document(todocu...
Make sure code returns a value to update or use a null check before if( not(isnull(fv!item.file_name)), fv!item.file_name, if( not(isnull(fv!item.document_id)), document(todocument(fv!item.document_id), "name") & "." & document( todocument(fv!item.document_id), "extension" ), {} ) )
Solve the following leet code problem
generate a calendar
{ a!localVariables( local!year: year(today()), local!month: month(today()), local!date: day(today()), local!curD:today(), local!darkMode: true(), local!sampledate:a!refreshVariable( value: date(local!year,local!month,local!date), refreshOnVarChange:local!date ), local!displayMonth: { "January", "February", "March", "A...
Solve the following leet code problem
I am getting an error trying to parse a list of docIds and convert it to a list of cdts I made. The cdt are of the form projectMouDocument{mouId(int), docId(int)) I pass in a static mouId and a list of docIds. Heres my script for the output into a process variable that is a list of projectMouDocuments. I expect to...
Based on the code you shared, it seems you're mapping docId to mouId and then mouId to the current item in documenIds. Is this intentional? It's important to ensure that the pv!mouId data type matches the type of value it should hold. For example, if mouId represents a single integer value, then the CDT field should b...
Solve the following leet code problem