> 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/getting-started/review-the-applet-structure.md).

# Review the Applet structure

When an Applet is created from an existing table, DC Works automatically generates a functional starting structure. This includes pages, input fields, table controls, records, navigation, and several preconfigured actions.

This guide introduces the structure generated for the **Asset Check-In** Applet.

### The Applet Designer

The Applet Designer contains three principal areas:

* The left panel contains the Applet’s pages, controls, records, and styles.
* The center canvas displays the selected page.
* The right panel contains the selected element’s properties, data binding, actions, and other settings.

<figure><img src="/files/BIJnJkeiFJ9KqL6PO5bG" alt=""><figcaption></figcaption></figure>

*The Asset Check-In Applet displayed in the Applet Designer.*

### Generated pages

The Applet creation wizard generated three pages:

| Page                  | Purpose                                                       |
| --------------------- | ------------------------------------------------------------- |
| **Data Capture Page** | Collects information and creates new table records.           |
| **Data View Page**    | Displays existing records and allows the user to select one.  |
| **Data Edit Page**    | Displays a selected record so it can be reviewed or modified. |

Select a page in the **Pages** panel to display it on the design canvas.

### Generated records

The wizard also created three Applet records connected to the **Asset Check-In** table:

| Record           | Purpose                                                              |
| ---------------- | -------------------------------------------------------------------- |
| **New Item**     | Temporarily holds the values entered for a new asset check-in.       |
| **Current Item** | Holds the existing record currently selected for viewing or editing. |
| **Items**        | Retrieves and holds a collection of existing records from the table. |

These are Applet records used while the Applet is running. Their names can be changed, although the automatically generated names are useful for understanding their intended purpose.

{% hint style="info" %}
An Applet record is not necessarily a permanently saved table record. It may temporarily hold data locally until an action adds or updates information in the connected table.
{% endhint %}

### Data binding

Each input field on the **Data Capture Page** is bound to a field within the **New Item** record.

For example:

* The **Asset ID** input is bound to the Asset ID field in New Item.
* The **Employee or Location** input is bound to the Employee or Location field.
* The remaining inputs are similarly bound to their corresponding fields.

To review an input’s data binding:

1. Select the input on the design canvas or in the Pages tree.
2. Locate the binding settings in the properties panel.
3. Review the selected record and field.

<figure><img src="/files/Xw41AIMjTCfIMav2UxQ6" alt=""><figcaption></figcaption></figure>

*The Asset ID input is bound to the corresponding field in the New Item record.*

As users populate the inputs, the values are placed in New Item. They have not yet been permanently added to the database table.

### How a new record is submitted

In the generated Applet, an **Input Action** is attached to the final input—the **Notes** field.

The action runs when the user completes the Notes field and presses Enter, tabs to the next control, or otherwise completes the input.

To review the action:

1. Select the **Notes** input.
2. Open the **Actions** tab in the properties panel.
3. Locate **Input Action**.
4. Select **Edit**.

<figure><img src="/files/FoiDAB0ljeTbT2eez5TM" alt=""><figcaption></figcaption></figure>

The generated Input Action performs the following sequence:

1. Adds the values stored in **New Item** to the connected table.
2. Clears the input fields.
3. Returns focus to the first input so the Applet is ready for another entry.

<figure><img src="/files/v1bpL7HcTRWh9u43yoN6" alt=""><figcaption></figcaption></figure>

*The Input Action saves the new record, clears the inputs, and prepares the Applet for the next entry.*

{% hint style="info" %}
Actions and conditions provide the logic behind an Applet. They allow workflows to be created without writing traditional program code.
{% endhint %}

### Navigation to the Data View Page

The **View** button on the Data Capture Page contains a navigation action.

To review it:

1. Select the **View** button.
2. Open its **Actions** settings.
3. Edit the button’s click action.

The generated action uses **Go To Page** to open the **Data View Page**.

<figure><img src="/files/H8mzDCyekToqpMbO0qlx" alt=""><figcaption></figcaption></figure>

### Loading existing records

When the Data View Page opens, its **Page Load Actions**:

1. Load existing records from the Asset Check-In table into **Items**.
2. Automatically select the first available row.

To review these actions:

1. Select the **Data View Page**.
2. Select **Page Load Actions**.
3. Review the configured action sequence.

<figure><img src="/files/tYYsKX6z5yPN0ruP8WaA" alt=""><figcaption></figcaption></figure>

The loaded records appear in the table displayed on the page.

### Selecting a record

The table on the Data View Page has a **Row Click Action** that determines what happens when a user selects a row.

The generated action:

1. Highlights the selected row.
2. Copies the selected record into **Current Item**.

To review this behavior:

1. Select the table control.
2. Select **Row Click Action**.
3. Review or edit the configured actions.

<figure><img src="/files/9FbJvICKUspfySrqi29n" alt=""><figcaption></figcaption></figure>

Current Item can then be used by another page or control, such as the Data Edit Page.

### Opening the Data Edit Page

After selecting a record, the user can select **Edit**.

The Edit button navigates to the **Data Edit Page**. When that page loads, its fields are populated using the values stored in **Current Item**.

This allows the user to review or modify the selected record.

<figure><img src="/files/CBaRbpbagYlMJLrCFvR6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The Data Edit Page requires a selected Current Item. The user should select a record on the Data View Page before opening the edit page.
{% endhint %}

### Updating an existing record

After modifying the fields on the **Data Edit Page**, select **Update**.

The Update button has an action configured to update the corresponding item in the connected table using the modified information stored in **Current Item**.

To review this action:

1. Select the **Update** button.
2. Open the **Actions** tab in the properties panel.
3. Locate the button’s click action.
4. Select **Edit** to review its configuration.

<figure><img src="/files/M9P9loDZC8V76kHXVpMN" alt=""><figcaption></figcaption></figure>

*The Update button records the modified Current Item information in the connected table.*

This completes the generated editing workflow:

1. The user selects an item on the **Data View Page**.
2. The selected information is loaded into **Current Item**.
3. The **Data Edit Page** displays the Current Item information.
4. The user modifies the desired fields.
5. The **Update** button writes the updated information back to the corresponding table record.

{% hint style="info" %}
The Update action modifies the existing table record; it does not create a new record.
{% endhint %}

### Save changes to the Applet

Changes made in the Applet Designer are not saved automatically.

Select the **Save** icon in the upper-right corner to save your changes. Each save increments the Applet’s revision number.

{% hint style="warning" %}
Save the Applet before leaving the Designer or beginning a test run. Unsaved changes may not be included.
{% endhint %}

### Test the Applet

Select the **play** button in the upper-right corner of the Applet Designer to launch a test run.

During testing, you can:

* Enter a new asset check-in.
* Confirm that completing the Notes field creates the record.
* Verify that the inputs clear afterward.
* View records loaded from the table.
* Select an existing record.
* Open the selected record on the Data Edit Page.

The complete testing procedure is covered in **Test Your Applet**.

### Next step

The Asset Check-In Applet’s generated structure is now ready for testing. Continue to **Test Your Applet** to enter sample information and verify that it is recorded correctly.


---

# 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/getting-started/review-the-applet-structure.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.
