myb-p-parent-child-fieldslisted
Install: claude install-skill AviMYB/mybusiness-plugins
# Parent/Child Fields (Simbla `Define Parent` / `subclassDepend` convention)
Configure a child `Pointer` field so its dropdown shows only the records whose own Pointer-to-parent matches the parent field's currently selected value on the same form.
## The model — two Pointers, one declaration
Think of three pieces:
| Piece | Where it lives | Role |
|---|---|---|
| **Parent table** | e.g., `AccountTypes`, `SalesDepartments` | Source of the parent values |
| **Child table** | e.g., `AccountStatuses`, `SalesSubDepartments` | Source of the child values; each row gets a Pointer back to the parent table identifying which parent it belongs to |
| **Define Parent** (UI name) / **`subclassDepend`** (MCP name) / **`data-subclass-depend`** (rendered HTML attribute) | A page-element attribute on the child field in the **form page** | Tells Simbla's runtime: "filter this child Pointer's options where `<child-table>.<some-pointer-field>` equals the value of the form's pointer to the named parent table" |
So the child table needs to know "which parent do I belong to" (a single Pointer to the parent table), and the child field on the page needs to be told **the name of the parent table** — Simbla figures out which pointer-field on the child table to filter by (via `data-subclass-pointers`, computed automatically from the child table's schema).
**Important nuance about the `subclassDepend` value**: It is the **class name of the parent table** (e.g., `"SalesDepartments"`), **not** the fie