> For the complete documentation index, see [llms.txt](https://docs.amltd.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amltd.com/dc-works/applets/action-reference.md).

# Action Reference

Use this reference to identify the Field, Navigation, Data, Text, and Custom actions available in the DC Works Applet Editor.

Actions are added to events such as Page Load, Scan, Keyboard, Button Click, Table View Row Click, and Input Actions. They can also be organized into reusable workflows.

This page provides a concise description of each action.

<figure><img src="/files/2oVQpltxJ9PhXvzPDWPv" alt=""><figcaption></figcaption></figure>

### Action categories

The Action editor contains 53 actions organized into five categories.

| Category       | Number of actions | General purpose                                                                |
| -------------- | ----------------: | ------------------------------------------------------------------------------ |
| **Field**      |                10 | Controls fields and their displayed values                                     |
| **Navigation** |                 5 | Moves users through or out of an Applet                                        |
| **Data**       |                16 | Loads, searches, changes, and synchronizes records                             |
| **Text**       |                10 | Parses, combines, formats, and modifies text                                   |
| **Custom**     |                12 | Performs device, interface, calculation, scripting, and integration operations |
| **Total**      |            **53** |                                                                                |

{% hint style="info" %}
The selected action may require a particular field type, record, database table, page, device feature, or API configuration.
{% endhint %}

## Field actions

Field actions control the visibility, availability, appearance, focus, selection, or value of fields on the current page.

| Action               | Purpose                                                    | Important behavior                                                                                                        |
| -------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **Show Field**       | Makes a hidden field visible.                              | If the field is already visible, the action is ignored.                                                                   |
| **Hide Field**       | Hides a field from the user.                               | Commonly used inside a condition to hide fields that are not currently applicable.                                        |
| **Enable Field**     | Enables a field so the user can interact with it.          | If the field is already enabled, the action is ignored.                                                                   |
| **Disable Field**    | Prevents the user from interacting with a field.           | The field remains visible but cannot be used.                                                                             |
| **Set Field**        | Replaces a field’s current value with a specified value.   | If the field is bound to a record, its Input Actions also execute when the field is populated.                            |
| **Set Color**        | Changes a field’s background color, border color, or both. | Useful for warnings, validation, and status indications.                                                                  |
| **Clear Fields**     | Sets the selected fields’ displayed values to empty.       | This does not necessarily reset the underlying working record. Use **Reset Record** when the record must also be cleared. |
| **Focus Field**      | Places input focus on a specified field.                   | Useful for allowing immediate entry without requiring the user to select the field first.                                 |
| **Remove Focus**     | Removes focus from the currently focused field.            | Use when input should no longer be directed to the active field.                                                          |
| **Select Table Row** | Automatically selects the first row in a Table View.       | Executes the selected row’s configured Row Click Actions.                                                                 |

### Show Field

Use **Show Field** to reveal a field that was initially hidden or previously hidden with **Hide Field**.

A common use is showing additional input fields when the user selects an option that requires more information.

### Hide Field

Use **Hide Field** when a field should no longer be visible.

For example, a condition can hide a Submit button until the Applet contains the information required to continue.

### Enable Field

Use **Enable Field** to restore user interaction with a disabled field.

This is useful when a field becomes applicable only after another step is completed.

### Disable Field

Use **Disable Field** to prevent interaction without hiding the field.

For example, a button can remain disabled until a required record has been loaded.

### Set Field

Use **Set Field** to place a value in a selected field.

The value can come from:

* Static text.
* An Applet record.
* An environment record.
* Another supported value source.

If the field is bound to a record, the new value becomes part of the working data and the field’s Input Actions execute.

### Set Color

Use **Set Color** to change a field’s border or background color.

A common use is highlighting an input field that requires attention.

### Clear Fields

Use **Clear Fields** to empty one or more fields displayed on the page.

Clear Fields is commonly combined with **Reset Record** after adding a database record so the page is ready for another entry.

### Focus Field

Use **Focus Field** to direct input to a selected field.

For example, add Focus Field to Page Load Actions to place focus on the first input field when the page opens.

### Remove Focus

Use **Remove Focus** to clear the currently focused field.

### Select Table Row

Use **Select Table Row** to select the first row in a Table View automatically.

If the Table View has Row Click Actions, those actions also run.

## Navigation actions

Navigation actions control page movement, Applet exit, and user logout.

| Action            | Purpose                                                      | Important behavior                                   |
| ----------------- | ------------------------------------------------------------ | ---------------------------------------------------- |
| **Go To Page**    | Navigates to a specified page in the current Applet.         | Executes the destination page’s Page Load Actions.   |
| **Previous Page** | Returns to the previously visited page.                      | Executes the previous page’s Page Load Actions.      |
| **Refresh Page**  | Reloads the current page.                                    | Executes the current page’s Page Load Actions again. |
| **Exit App**      | Closes the current Applet and returns to the Suite launcher. | The user remains signed in.                          |
| **Logout**        | Signs out the current user.                                  | Returns the user to the login screen.                |

### Go To Page

Use **Go To Page** to navigate directly to another page in the same Applet.

The destination page’s Page Load Actions run when the page opens.

### Previous Page

Use **Previous Page** to return to the page visited immediately before the current page.

The Page Load Actions configured for that page run again.

### Refresh Page

Use **Refresh Page** to reload the current page.

This action also repeats the page’s Page Load Actions.

### Exit App

Use **Exit App** to close the Applet and return to the Suite launcher page.

### Logout

Use **Logout** to sign out the current user and return to the login screen.

## Data actions

Data actions work with Applet records, database tables, list records, Table Views, Chart Views, offline data, and workflows.

{% hint style="warning" %}
Review all record and filter selections before using a deletion action. **Batch Delete Records** deletes every record in the associated table when no filters are provided.
{% endhint %}

| Action                   | Purpose                                                                           | Important behavior                                                                                      |
| ------------------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| **Sync Records**         | Synchronizes locally stored device records with a cloud table.                    | Intended for Suites using offline mode and requires network access to communicate with the cloud.       |
| **Load Table**           | Retrieves records for a Table View and populates its bound list record.           | The Table View must have a Bound Record.                                                                |
| **Search Table**         | Retrieves multiple records from a database table using filters.                   | Matching records are placed in the specified list record.                                               |
| **Load Chart**           | Retrieves records for a Chart View and populates its bound record.                | The Chart View must have a Bound Record.                                                                |
| **Reset Record**         | Clears the values held in a selected working record.                              | Commonly paired with Clear Fields when resetting a data-entry page.                                     |
| **Set Record**           | Sets one or more values in a local working record.                                | Unspecified record fields remain unchanged.                                                             |
| **Add Record**           | Inserts a new record into its associated database table.                          | Required fields must be populated. A Table View can optionally be updated after the addition.           |
| **Update Or Add Record** | Updates an existing database record or adds it when no match exists.              | The decision is based on the record’s primary field.                                                    |
| **Update Record**        | Writes changes from a working record to its existing database record.             | The existing record must first be loaded into the working record.                                       |
| **Delete Record**        | Deletes the selected record from its associated database table.                   | The record to delete must first be loaded.                                                              |
| **Batch Delete Records** | Deletes multiple database records using optional filters.                         | Without filters, all records in the associated table are deleted.                                       |
| **Lookup Record**        | Retrieves the first database record matching a column value and optional filters. | The result is placed in a specified single record.                                                      |
| **Add To List**          | Adds a value to a custom list record or list field.                               | The value can be added at the beginning or end and can be prevented from duplicating an existing value. |
| **Remove From List**     | Removes a value from a custom list record or list field.                          | All instances of the specified value are removed.                                                       |
| **Reset Timer Workflow** | Restarts the interval for a selected timer workflow.                              | Timer workflows are configured in the page’s Actions properties.                                        |
| **Run Workflow**         | Runs a selected reusable workflow.                                                | Workflows are configured in the page’s Actions properties.                                              |

### Sync Records

Use **Sync Records** to compare locally stored device data with its cloud table and exchange new, changed, or deleted records.

This action is relevant when offline mode is enabled for the Suite.

Available options include:

* **Report Sync Progress**
* **Resync Full Table**

Detailed explanations of these options can be added later.

### Load Table

Use **Load Table** to retrieve records for a selected Table View.

The action uses the Table View’s Bound Record and table configuration to populate its rows.

If offline mode is not enabled, a network connection is required to communicate with the cloud table.

### Search Table

Use **Search Table** to retrieve a list of records from a database table using one or more filters.

The matching records are placed in a specified list record.

Unlike **Lookup Record**, which returns the first matching record, Search Table can return multiple entries.

### Load Chart

Use **Load Chart** to retrieve records and populate a selected Chart View.

The Chart View must be connected to an appropriate Bound Record.

### Reset Record

Use **Reset Record** to clear all values from a selected working record.

Reset Record is commonly used after **Add Record** so the record can receive a new set of values.

### Set Record

Use **Set Record** to place a specified value in a working record.

Only the selected record fields are changed. Other values in the record remain unchanged.

Set Record does not write the change to the database table.

### Add Record

Use **Add Record** to insert a new entry into the database table associated with the selected record.

The working record can be populated through:

* Bound input fields.
* Set Record.
* Another configured operation.

If required fields are empty, the action does not complete and the applicable input fields are highlighted.

A Table View can optionally be selected so the new entry appears in the displayed table. If **Select Table Row** is enabled, the new row is selected and its Row Click Actions run.

### Update Or Add Record

Use **Update Or Add Record** when the Applet should update a matching database record or create a new one.

DC Works compares the working record’s primary-field value with the database table:

* If a match is found, the record is updated.
* If no match is found, a new record is added.

### Update Record

Use **Update Record** to write changes from a working record to its existing database entry.

The existing record must first be loaded, commonly through:

* Lookup Record.
* A Table View Row Click Action.
* Another configured record-loading operation.

### Delete Record

Use **Delete Record** to remove a single record from its associated database table.

The record must first be loaded into the working record so DC Works can identify which entry to delete.

### Batch Delete Records

Use **Batch Delete Records** to remove multiple records from an associated database table.

Filters can limit the deletion to matching records.

{% hint style="warning" %}
If no filters are configured, **Batch Delete Records** deletes all records from the associated database table. Confirm the table and filters before using this action.
{% endhint %}

### Lookup Record

Use **Lookup Record** to retrieve a specific database entry using:

* A column.
* A comparison value.
* Optional filters.

If multiple records match, the first record found is returned and placed in the specified single record.

### Add To List

Use **Add To List** to add a value to a custom list record or a record field configured as a list.

The action can:

* Add the value to the beginning of the list.
* Add the value to the end of the list.
* Add the value only when it does not already exist.

### Remove From List

Use **Remove From List** to remove a specified value from a custom list record or list field.

All matching instances are removed.

### Reset Timer Workflow

Use **Reset Timer Workflow** to restart the timer interval for a selected timer workflow.

For example, resetting a five-minute workflow timer prevents it from running again until a new five-minute interval has elapsed.

### Run Workflow

Use **Run Workflow** to execute a reusable workflow configured in the page’s Actions properties.

## Text actions

Text actions parse, combine, measure, format, or modify text values.

| Action          | Purpose                                                                | Important behavior                                                                                             |
| --------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| **Parse**       | Extracts structured values from GS1 barcode data.                      | Uses GS1 Application Identifiers to return values such as GTIN, expiration date, lot number, or serial number. |
| **Combine**     | Joins two or more text values.                                         | An optional separator can be placed between the values.                                                        |
| **Length**      | Returns the number of characters in a text value.                      | Spaces and other characters are included in the returned length.                                               |
| **To Upper**    | Converts letters to uppercase.                                         | Numbers, symbols, and spaces remain unchanged.                                                                 |
| **To Lower**    | Converts letters to lowercase.                                         | Numbers, symbols, and spaces remain unchanged.                                                                 |
| **Select**      | Extracts part of a text value using start and end positions.           | The selected range includes the specified start and end positions.                                             |
| **Replace**     | Replaces matching text with another value.                             | Matching is sensitive to spelling and capitalization.                                                          |
| **Pad**         | Adds text to the beginning or end until the desired length is reached. | Padding occurs only when the original text is shorter than the requested length.                               |
| **Trim**        | Removes whitespace from the beginning and end of text.                 | Whitespace within the text remains unchanged.                                                                  |
| **Date Format** | Converts a date into a specified text format.                          | Uses supported date-and-time format patterns.                                                                  |

### Parse

Use **Parse** to extract Application Identifier values from GS1 barcode data.

Common GS1 values include:

* GTIN.
* Expiration date.
* Lot number.
* Serial number.

### Combine

Use **Combine** to join multiple text values into one output.

An optional separator, such as a space, comma, hyphen, or custom value, can be inserted between them.

### Length

Use **Length** to return the number of characters in a text value.

### To Upper

Use **To Upper** to convert lowercase letters to uppercase.

### To Lower

Use **To Lower** to convert uppercase letters to lowercase.

### Select

Use **Select** to extract a specific portion of text by identifying its starting and ending positions.

### Replace

Use **Replace** to find a word or phrase and replace all matching occurrences with another value.

### Pad

Use **Pad** to add specified characters to the beginning or end of a value until it reaches the required length.

For example, a numeric value can be padded with zeros to produce a fixed-length identifier.

### Trim

Use **Trim** to remove spaces, tabs, and newline characters from the beginning and end of text.

### Date Format

Use **Date Format** to convert a date or time value into formatted text.

The action supports patterns for components such as:

* Year.
* Month.
* Day.
* Day of the week.
* Hour.
* Minute.
* Second.

## Custom actions

Custom actions provide device access, messages, calculations, printing, scripting, and API integration.

| Action                   | Purpose                                                                     | Important behavior                                                            |
| ------------------------ | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| **Popup Message**        | Displays a message in a popup window.                                       | The popup includes a title, message, and button text.                         |
| **Custom Javascript**    | Evaluates custom JavaScript.                                                | Fields and records must be referenced by their IDs.                           |
| **Image Capture**        | Opens the device camera and stores an image in an Image field.              | If no camera is available, the action is ignored.                             |
| **Take Picture**         | Captures an image from a Camera field and places it in a record.            | Requires a configured Camera field on the page.                               |
| **Scan With Camera**     | Opens the device camera to capture a barcode.                               | The decoded barcode is placed in a selected Input field.                      |
| **Color Pick**           | Opens a color-selection popup.                                              | The selected color is placed in a selected Input field.                       |
| **Reset Barcode**        | Clears the currently stored barcode data.                                   | Useful before accepting another scan.                                         |
| **Reset Keyboard Entry** | Clears the currently stored keyboard-entry data.                            | Useful before accepting another keyboard value.                               |
| **Math**                 | Performs a selected mathematical operation and returns the result.          | If the inputs are not supported number or date values, the action is ignored. |
| **Play Sound**           | Plays a selected sound file.                                                | Useful for audible success, warning, or error feedback.                       |
| **Print Page**           | Opens the print-page dialog.                                                | Printing options depend on the running device or browser.                     |
| **API Call**             | Performs a configured API request and stores the response in an API record. | The API connector, API call, and API record must be configured first.         |

### Popup Message

Use **Popup Message** to display information to the user.

Configure:

* Title.
* Message.
* Button text.

A common use is confirming that a record was added successfully.

### Custom Javascript

Use **Custom Javascript** to perform behavior that is not available through the standard actions.

Custom JavaScript can:

* Manipulate page fields.
* Work with Applet records.
* Create custom interface behavior.
* Display custom messages.

Use the field’s ID when referencing a page field and the record’s ID when referencing an Applet record.

### Image Capture

Use **Image Capture** to open the device camera and store the captured image in a selected Image field.

If the running device does not provide camera access, the action is ignored.

### Take Picture

Use **Take Picture** to capture an image from a Camera field and store the resulting image value in a record.

### Scan With Camera

Use **Scan With Camera** to open the camera for barcode capture.

The decoded value is placed in the selected Input field.

### Color Pick

Use **Color Pick** to open a color picker and place the selected color value in an Input field.

### Reset Barcode

Use **Reset Barcode** to clear the stored barcode data before another scan is processed.

### Reset Keyboard Entry

Use **Reset Keyboard Entry** to clear the stored keyboard-entry value.

### Math

Use **Math** to perform a selected mathematical operation using two input values.

The result is placed in the selected output.

The action is ignored if an input is not a supported number or date value.

### Play Sound

Use **Play Sound** to play an audio file.

For example, play a success sound after **Add Record** completes.

### Print Page

Use **Print Page** to open the print dialog for the current page.

### API Call

Use **API Call** to perform a request configured through an API Connector.

Before using the action:

1. Create the API Connector.
2. Configure the API call.
3. Add an API record to the Applet.
4. Select the connector, call, and destination API record in the action.

The response is stored in the selected API record.

Enable local execution when the API is accessible only from the local network. The API must allow the applicable web origin through its CORS configuration.

### Related pages

* **Data Binding** explains how fields exchange values with Applet records.
* **Actions, Events, and Conditions** explains where actions can be added, how they execute, and how conditions control them.
* **Records and Data** explains how working records are created and used within an Applet.

### Next

Actions determine how an Applet responds to user input and events. The next step is refining how its pages and fields are presented to users.

Continue to **Style and Appearance** to learn how to configure colors, fonts, borders, spacing, backgrounds, and other visual properties that create a clear and consistent Applet interface.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amltd.com/dc-works/applets/action-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
