# Step 3: Store skipped records in a list

Before storing skipped records in an entity, the records need to be stored in a list. In this exercise, the deleted records details are stored in a variable in the “On Skipped record” section that will be used to create a record in the “On Completed” section.

* To define a variable to hold the skipped records, go to the “Variables” tab.
* In the “Variables” tab, add and define a variable as follows: \
  Name: “skippedRecordsList”, Data type: “csvtoentity”, Select “List”.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9ex1st3skippreclistvar.png" alt=""><figcaption></figcaption></figure>

* To define the actions to be executed for the records that are skipped, go to the “Code” tab>“On Skipped record” section.\
  To add an “Action box” in the “On Skipped record” section, click the \[+ Action box] button.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9ex1st3osraddactbox.png" alt=""><figcaption></figcaption></figure>

* All shared variables can be displayed in the Action box>Variables tab by clicking the \[Show Shared Variables]button.
* To store the skipped record in a variable before updating it in the target entity, add a new variable as follows:\
  Variable name: “skippedCustomer”, Data type: “csvtoentity”.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9ex1st3osrskipcustvar.png" alt=""><figcaption></figcaption></figure>

* To add Actions, go to the “Code” tab and add two (2) Actions.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9ex1st3osraddact.png" alt=""><figcaption></figcaption></figure>

* Define the first Action as follows: &#x20;
  * Action: “Update Variable”
  * Target Value: “skippedCustomer.Message”
  * Update the Source with multiple values as follows:&#x20;
    1. Enter the constant text as “Customer\_ID ”.&#x20;
    2. Select variable as “skipped.Customer\_ID”.&#x20;
    3. Enter the constant text as “ was skipped due to the following reason: ”&#x20;
    4. Select variable as “skippedReason”. \
       (The reason for the selected Customer\_ID to be skipped is stated)

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9ex1st3osruvskipcustmsg.png" alt=""><figcaption></figcaption></figure>

* Define the second Action as follows:
  * Action: “Add Item to List”
  * Target Value: “skippedRecordsList”
  * Source: “skippedCustomer” (add skipped records to list)

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_9/ch9ex1st3osradditemtolskipreclist.png" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.langstack.com/welcome/get-started/learn-langstack/introduction-to-etl-pipeline/exercise-1-skip-customer-records/step-3-store-skipped-records-in-a-list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
