From 0451ed5546a58f989c9834b05075b426f9ee936d Mon Sep 17 00:00:00 2001 From: delchev Date: Thu, 6 Aug 2026 14:32:13 +0300 Subject: [PATCH] docs(intent): generates items list form - computed create-from lines Document the second, mutually-exclusive shape of generates.items: a LIST of computed synthetic lines whose cells are expressions over the source record (numeric arithmetic, {field} interpolation, source FK copy, now/literal, with a when guard), for a create-from that must build a computed line rather than clone a source child 1:1. Tracks eclipse-dirigible/dirigible#6555. Co-Authored-By: Claude Opus 4.8 --- docs/help/intent/dsl-reference.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/help/intent/dsl-reference.md b/docs/help/intent/dsl-reference.md index c0f9bb8aa..b8b0870dc 100644 --- a/docs/help/intent/dsl-reference.md +++ b/docs/help/intent/dsl-reference.md @@ -497,6 +497,26 @@ generates: Adds a button on the source view; the clone saves through the target's repository so numbering, status init and calculated fields fire. +`items` has two mutually-exclusive shapes. As an **object** (above) it **mirrors** each source +child row 1:1. As a **list** it builds **computed** synthetic lines whose cells are expressions +over the **source** record - use it when a create-from must produce a computed line (e.g. one +invoice line carrying a period's rolled-up total) rather than a 1:1 clone. The target's line-items +child is resolved automatically (never named): + +```yaml + items: # computed synthetic lines over the SOURCE record + - name: "Services for {period}" # string: {field} interpolation (or a source-field copy / literal) + quantity: 1 # numeric: an arithmetic expression over the source, rounded to + price: BillableAmount # the target field's scale (a bare literal is a trivial one) + when: "BillableAmount != 0" # optional guard: ==|!= +``` + +A **numeric** cell is an arithmetic expression evaluated exactly as a calculated field or a posting +item amount is (source identifiers are the PascalCase field names; a null reads as 0); a **string** +cell interpolates `{field}` placeholders, copies a bare source property, or is a plain quoted +literal; a **to-one relation** cell copies the raw source foreign key; a `when` cell guards the +whole line. The list form is not available on a `schedules[].generate`. + ## transitions - guarded status flips A per-record button that flips an entity's `function: EntityStatus` relation on demand - void,