Skip to content

Commit 65f46cd

Browse files
akoclaude
andcommitted
docs(write-microflows): note @caption is ignored on loops, use @annotation
Document the MDL042 gotcha in the user-facing skill: loops have no caption in Mendix, so @caption on a loop is dropped — use @annotation to attach a note. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 93a0ae5 commit 65f46cd

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.claude/skills/mendix/write-microflows.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,20 @@ begin
438438
set $ActiveCount = $ActiveCount + 1;
439439
end if;
440440
end loop;
441+
442+
-- Label a loop with a note (loops have no caption in Mendix)
443+
@annotation 'Process each product'
444+
loop $Product in $ProductList
445+
begin
446+
set $count = $count + 1;
447+
end loop;
441448
```
442449

450+
> **`@caption` does nothing on a loop.** Mendix for-loops have no caption
451+
> property, so `@caption` on a `loop` is silently dropped (`mxcli check` flags
452+
> it as **MDL042**). To label a loop, use `@annotation 'text'` — it attaches a
453+
> note, exactly like drawing one onto the loop in Studio Pro.
454+
443455
**Note**:
444456
- Loop variable (`$Product`) is scoped to the loop body
445457
- The loop variable type is **automatically derived** from the list type (e.g., `list of Test.Product``Test.Product`)

0 commit comments

Comments
 (0)