← ClaudeAtlas

myb-p-multi-select-fieldlisted

Create a working multi-select (multi-pick) field in MyBusiness CRM that lets users choose multiple values from a lookup table. The field uses Simbla's special name-pattern convention (`array_<purpose>_Pointer_<TargetTable>`) so the runtime renders it as a true `<select multiple>` driven by Select2 without any custom JS. Use this skill whenever the customer wants a multi-select field, checklist-style field, tags field, multi-pick dropdown, or any field that should store an array of pointer objectIds. Triggers on requests like 'שדה בחירה מרובה', 'multi-select', 'multi-pick', 'תגיות', 'תחומי עניין', 'multiple categories', 'array of pointers', 'multi-value lookup', 'multi value field', 'multiple values per record', 'select many', 'pick several'. Use this BEFORE attempting any other approach to multi-select — the name-pattern convention is the only mechanism Simbla's runtime recognizes natively.
AviMYB/mybusiness-plugins · ★ 2 · Testing & QA · score 63
Install: claude install-skill AviMYB/mybusiness-plugins
# Multi-Select Field (Simbla name-pattern convention) Create a field that: - Stores an **array of pointer objectIds** in the database (Parse `Array` type) - Renders on the form as a **Select2 multi-pick dropdown** populated from a lookup table - Works **without any custom JavaScript** — Simbla's runtime recognizes the field name and configures the rendering ## The core idea — name as metadata Simbla's form runtime parses the field name to decide how to render it. The pattern is: ``` array_<purpose>_Pointer_<TargetTable> ``` Each part has meaning: | Segment | Meaning | |---------|---------| | `array_` | Prefix → the field is a multi-pick array, render with `multiple="multiple"` | | `<purpose>` | Free-form snake_case (e.g., `sector`, `interests`, `tags`). Just for human readability — runtime ignores it. | | `_Pointer_` | Separator → the array elements are Parse pointers (objectIds), not raw values | | `<TargetTable>` | **Exact** class name of the lookup table (case-sensitive). Runtime sets `targetclass="<TargetTable>"` on the `<select>` and fetches options from there. | **Why this works**: When Simbla renders the form, it looks at each form-control's `name`. If the name matches `^array_.+_Pointer_(.+)$`, it knows to: 1. Make it `<select multiple>` 2. Set `targetclass` to the captured table name 3. Wire up Select2 with `data-criteria=containedIn` 4. Save selected values as a Parse `Array` of pointer objectIds No other approach (renaming, post-load JS injection, plain `Ar