Skip to content

Support for Multi-Strata Schema Fields, Auto-Calculation Enhancements, and Improved Schema–UI Integration #3964

@prernaadev01

Description

@prernaadev01

Problem description

While working with schema spreadsheets, we encountered challenges in implementing calculations per stratum, especially where fields are expected to support multiple responses. It’s unclear how this should be reflected in the UI and whether policies already support this type of multi-answer field behavior.

Additionally, the current workflow requires re-implementing Excel calculations on the policy creation side using JavaScript or calculation blocks, which is inefficient and error-prone.

We also see an opportunity to streamline schema usage: if the schema includes example data, it would be helpful for that information to auto-populate the UI during upload, improving consistency and reducing manual entry.

Requirements

  1. Multi-Strata Schema Field Handling
  • Support for schema fields that represent multiple strata (e.g., arrays of objects, repeated groups).
  • Guardian UI should correctly render:
    • Array-based strata fields.
    • Repeated groups with sub-fields (e.g., { stratumName, value, formulaInput }).
  • Confirm whether existing Guardian policy engines already allow:
    • “Multiple answer” fields using JSON Schema array types.
    • Dynamic addition/removal of rows in the UI.
  1. Auto-Calculation Optimization (Reduce Re-Implementation of Excel Logic)
  • Evaluate whether Guardian can:
    - Auto-generate calculation blocks based on schema metadata (e.g., formulas or computed-field hints).
    - Allow attaching formulas directly inside schema definitions (similar to calculated, dependsOn, or expression metadata).
  1. Schema Upload + UI Prefill
  • When uploading a schema in Guardian:
    • Allow default, example, or x-example values in the schema to auto-populate the rendered UI fields.
    • Update schema renderer to prefll fields wherever example/default data is provided.

Definition of done

  • Clear UX/UI behavior defined for multi-strata fields in Guardian forms.
  • Confirmation of current Guardian capabilities with respect to array/multi-answer schema fields.
  • Proposed design or implementation approach for:
    • Supporting strata-based calculations,
    • Auto-generating or reusing formulas.
  • Feasibility assessment and (if approved) implementation of default/example auto-population during schema upload.

Acceptance criteria

100% mentioned in DOD

Metadata

Metadata

Assignees

No one assigned

    Labels

    ø enhancementNew feature or request Propose to delete. Use issue type instead.
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions