hashgraph / hashgraph/guardian

Table field type: add column name configuration

Open
#6,594 0 comments 0 reactions 1 assignee Claimed by @ihar-tsykala View on GitHub
status: pr delivered / ready for review
Dominant language
TypeScript
Stars
146
Forks
186
Avg merge
2d 20h
Merged PRs (30d)
126

Description

## Job Story

When configuring a new Table field type, I want to define column names as part of the setup, so I can ensure the table has a clear structure before any data is entered.

## Acceptance Criteria

* [ ] Selecting "Table" as the field type shows a column configuration UI
* [ ] Each column has a display name and a key field
* [ ] Column keys are included in the JSON output (e.g. `{ "co2_tonnes": 42, "year": 2024 }`)
* [ ] Column keys can be used to reference table values in the math block
* [ ] Column keys can be used to reference table values in the custom logic block
* [ ] Column values can be fetched via the APIs using the column key
* [ ] Users can add at least one column with a custom name and key
* [ ] Users can remove columns (minimum of 1 required)
* [ ] Users can reorder columns
* [ ] Field description input is still present and functional

## Artifacts & Considerations

_N/A_

---

## Enhancement Summary

When a user selects **Table** as a field type, the configuration panel currently only prompts for a field description. There is no way to define column names or column keys for the table upfront. Without a stable key per column, data cannot be reliably indexed or accessed via the math block, custom logic block, or APIs.

## Steps to Reproduce

1. Create a draft schema
2. Add a field as a table type
3. Try to add column headers (not possible at the moment)
4. Try to reference a table column value in a math block, custom logic block, or via API (not possible at the moment)

## Expected Result

When **Table** is selected as the field type, the configuration panel should expose a **Column configuration** section where each column has:

* A **display name** — the human-readable label shown in the UI
* A **key** — a stable, unique identifier used in the JSON output, APIs, math blocks, and custom logic blocks (e.g. `year`, `co2_tonnes`)

## Actual Result

_Only a field description can be added._

## Artifacts

_N/A_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.