Intermediate

Index Node: Synchronizing Datasets & Lists

Synchronize active records across multiple partitioned tables and lists, enforce master index cascade, and manage read-only downstream steppers.

# Index Node

The **Index Node** (formerly known as the Record Selector Node) is a specialized canvas control node designed to solve a fundamental challenge in complex prompt pipelines: **synchronizing records and items across multiple partitioned tables and lists**.

---

## 1. Why Partition Datasets?

To protect browser memory and maintain 60fps canvas performance, Nodestr caps Table Nodes at **12 columns in Local Mode** and **16 columns in Cloud Mode**, and List Nodes at 100/250 items.

When building rich, multi-faceted prompt architectures—such as deep character profiles, RPG worldbuilding, or multi-variable testing—a single entity often requires dozens of attributes:
- **Table 1: Core Bio** (Name, Age, Gender, Species, Profession)
- **Table 2: Psychological Profile** (MBTI, Enneagram, Flaws, Desires, Tone)
- **List Node: Quests / Objectives** (List of 10 adventure goals)

Without a master controller, keeping all datasets aligned on "Index #3" would require manually clicking through three separate steppers. The **Index Node** unifies them into a single master control point.

---

## 2. Node Anatomy & Violet Connection Architecture

The Index Node is styled with a distinct **Violet** theme:

1. **Numeric Stepper**: Centered chevron buttons (`‹` and `›`) with generous click hitboxes for stepping through items and rows one by one.
2. **Direct Numeric Input**: An editable numeric field allowing you to type any index number (e.g. `42`) to jump directly to that row or list item.
3. **Clamping & Status Footer**: The node dynamically clamps input values between `1` and the maximum count among connected targets. The footer displays real-time connection status:
   `Connected: 2 tables, 1 list (max 10 recs)`
4. **Violet Output Port**: Located on the right edge of the node, emitting a violet wire carrying the master index to connected tables, lists, or text nodes.

---

## 3. Dual Compatibility (Tables and Lists)

The Index Node seamlessly coordinates both tabular and list data:

### A. Connected to a Table Node
- Connects from the Index Node's right Violet handle (`Sync Out`) to the Table Node's left Violet handle (`Index In`).
- Forces the Table Node into **Single Record** mode with its built-in stepper locked to **read-only (`🔗`)**.
- Cascades the master record index to all downstream Consumer Text Nodes.

### B. Connected to a List Node
- Connects from `Sync Out` to the List Node's left Violet handle (`Index In`).
- Advances the active item index of the list in tandem with connected tables.
- Downstream nodes receiving the List Node's `Current item` port automatically reflect the synchronized entry.