Skip to content
Skills Library
Data & analytics · Building & coding

kx-dataform

/kx-dataform

Use this when the user wants a KX Dashboards parameter-input form that writes values into ViewStates and re-executes a data source on submit: simple input panels, forms with dropdowns, date pickers, sliders, or password fields. Use kx-formbuilder for free-form record entry and kx-datafilter for filter/query-builder UIs instead.

Repository
kx-skills ↗
Licence
Apache-2.0
Last repository change
15.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
6
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 15.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use this when the user wants a KX Dashboards parameter-input form that writes values into ViewStates and re-executes a data source on submit: simple input panels, forms with dropdowns, date pickers, sliders, or password fields. Use kx-formbuilder for free-form record entry and kx-datafilter for filter/query-builder UIs instead.

Original author description

Use this when the user wants a KX Dashboards parameter-input form that writes values into ViewStates and re-executes a data source on submit: simple input panels, forms with dropdowns, date pickers, sliders, or password fields. Use kx-formbuilder for free-form record entry and kx-datafilter for filter/query-builder UIs instead.

How it works

  1. Reference Files
  2. When to Use This Skill
  3. ⚠️ Dataform-Specific Hazards
  4. Workflow
  5. Output Contract
Original SKILL.md headings · 64 lines, 656 words
SKILL.md preview
---
name: kx-dataform
description: "Use this when the user wants a KX Dashboards parameter-input form that writes values into ViewStates and re-executes a data source on submit: simple input panels, forms with dropdowns, date pickers, sliders, or password fields. Use kx-formbuilder for free-form record entry and kx-datafilter for filter/query-builder UIs instead."
requires:
  - kx-dashboard-core
---

# KX Dataform Component

> Also read **kx-dashboard-core** for: envelope, screen/widget wrapper, data sources, ViewState, binding patterns, actions, notifications, and the pre-flight checklist.

This skill uses **progressive disclosure**: the workflow, hazards, and output rules are here; the bulky JSON schema, config tables, and examples live in `reference/`. Read only the reference file relevant to your current step.

## Reference Files

| File | Read it when you need… |
|---|---|
| [reference/generate-config.md](reference/generate-config.md) | `generate.js` `componentType: "dataform"` config keys — `formFields`, `basics`, `style` tables. |
| [reference/component-schema.md](reference/component-schema.md) | The raw component JSON — full options envelope, `Basics`, form-field (`ViewStates`) entry + `PathEnc` rule, the six field types, `Style`, grouped-ViewState setup. |
| [reference/data-source-patterns.md](reference/data-source-patterns.md) | Wiring the submit data source — kdb+ query (Pattern A) vs virtual (Pattern B), inline param syntax, kdb+ type codes. |
| [reference/examples.md](reference/examples.md) | A full worked example plus 8 few-shot NLQ → JSON examples. |
| [reference/nlq-tests.md](reference/nlq-tests.md) | Maintainer NLQ regression queries to retest on every MR that changes this skill. |

---

## When to Use This Skill

- User asks to create a parameter form or submit form for a KX Dashboard
- User wants to let dashboard users set kdb+ query parameters interactively (sym, date range, threshold, etc.)
- User wants form fields to publish values into grouped ViewStates (e.g. `"Form 1/sym"`) and re-execute a data source on submit
- User wants to combine a Dataform with a Datagrid to show the result of the submitted parameters

---

## ⚠️ Dataform-Specific Hazards

1. **`PathEnc` must be URL-encoded.** The ViewState path `"Dataform 1/sym"` becomes `"Dataform%201%2Fsym"`. Always URL-encode: space → `%20`, slash → `%2F`. Never use the raw path.
2. **ViewStates must be grouped under the form name.** Use `"FormName/fieldName"` paths (e.g. `"Dataform 1/sym"`). Flat ViewState names (e.g. just `"sym"`) will NOT bind to form fields correctly.
3. **`version` must be `"v2.4.0"`** — not `"c2.4.0"`. The exported dashboard JSON uses `"v2.4.0"`.
4. **Virtual data source `_virtualParams` values are raw paths** (not encoded): `"Dataform 1/sym"`, not `"Dataform%201%2Fsym"`.
5. **`Data` in Basics must be a data binding object** (`{ "_dashboardsType": "data", "value": "<name>" }`), never an empty string if a submit source exists.
6. **`isDataform: true`** must be set in options alongside `version` — omitting it disables form-mode behaviour.
7. **Dropdown `DataSourceMapping.Value` and `.Text`** must be actual column names from the dropdown data source; leaving them empty renders a blank list.
8. **Number field `Increment`** must be a positive number — `0` is invalid and disables the spinner.
9. **Never invent unknown `_Type` values** for `FieldType`. Valid types: `"Default"`, `"Dropdown"`, `"Number"`, `"Datepicker"`, `"Slider"`, `"Password"`.

---

## Workflow

1. **Clarify inputs.** You need the connection name and the field list with types. If the request is ambiguous, ask one focused question before generating (see Output Contract).
2. **Declare grouped ViewStates** under the form name — `"FormName/field"` paths (see `reference/component-schema.md` → ViewState Setup).
3. **Wire the submit data source** — kdb+ query (live) or virtual (client-side display). See `reference/data-source-patterns.md`.
4. **Build the component** — envelope + `Basics` + one `ViewStates` entry per field (URL-encode every `PathEnc`!) + `Style`. Field-type shapes and the `PathEnc` rule are in `reference/component-schema.md`.
5. **Or use generate.js** with `componentType: "dataform"` and the config keys in `reference/generate-config.md`.
6. **Validate** against the Hazards above and the Output Contract below. Copy from `reference/examples.md` when a pattern matches.

---

## Output Contract

- Return JSON objects only. No commentary inside JSON output.
- Full Dataform config → one component object shaped as in `reference/component-schema.md` (includes `Basics`, `Style`, `Alignment`, `format`, `version`, `isDataform`).
- `ViewStates` array only → return `Basics.ViewStates` array.
- Always include `Basics.Data` in a full config; use `"<YOUR_DATA_SOURCE>"` as placeholder if the source is not provided.
- `PathEnc` must always be URL-encoded — never the raw path.
- `version` must be `"v2.4.0"` (not `"c2.4.0"`).
- `isDataform: true` must always be present in `options`.
- If user request is ambiguous (e.g. no connection name, no field types), ask one focused clarification question before generating JSON.
Files in this package (6)
  • SKILL.md 5 KB
  • reference/component-schema.md 6 KB
  • reference/data-source-patterns.md 3 KB
  • reference/examples.md 19 KB
  • reference/generate-config.md 4 KB
  • reference/nlq-tests.md 3 KB

Versions

The database has no other skills named kx-dataform.

Database snapshot: 13.11.2026 · package version 1ba2431308a0 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100kx-formbuilder
    Use this when the user wants a KX Dashboards data-entry form that collects user values for submission or editing, including dynamic forms, validators, and form-state output to ViewStates. Use kx-dataform for parameter-input forms that re-run data sources on submit rather than general data entry.
  • 100kx-datafilter
    Generate KX Dashboards input and filter components: DataFilter (visual filter builder, definitionId=48) and QueryBuilder (visual kdb+ query constructor, definitionId=10254). Use when the user asks for a filter panel, filter builder, AND/OR filter, or query builder for a grid or…
  • 100dataform-bigquery
    Expertise in generating clean, correct, and efficient Dataform pipeline code for BigQuery ELT. Use this when creating or modifying Dataform pipelines, actions, or source declarations, when Dataform, SQLX, or BigQuery are mentioned in a transformation, when data needs to be…
  • 95dataform-bigquery
    Expertise in generating clean, correct, and efficient Dataform pipeline code for BigQuery ELT. Use this when creating or modifying Dataform pipelines, actions, or source declarations, when Dataform, SQLX, or BigQuery are mentioned in a transformation, when data needs to be…
  • 100dataform-gcp-sql-transformations
    Use this skill when managing data transformation workflows and dependency graphs in BigQuery natively using Dataform and SQLX.
  • 90bigquery-and-dataform-platform-engineering
    Guides agents through BigQuery- and Dataform-centered data engineering workflows. Use when designing BigQuery physical models, ingestion boundaries, Dataform transformation workflows, slot or cost controls, and platform decisions across BigQuery, Dataflow, Dataproc, and GCP orchestration services.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.