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 |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 4