Skip to content

check --references should validate DYNAMICTEXT ContentParams type compatibility #146

@engalar

Description

@engalar

Description

mxcli check script.mdl -p app.mpr --references does not validate that DYNAMICTEXT ContentParams attribute bindings are type-compatible. When binding an Integer attribute using simple AttrName syntax inside a DataView, the check passes but the page renders incorrectly at runtime (empty or error).

Steps to Reproduce

-- DashboardData entity has TotalOrders: Integer

CREATE PAGE MyModule.Dashboard (...) {
  DATAVIEW dv (DataSource: MICROFLOW MyModule.DS_GetData) {
    DYNAMICTEXT txt (Content: '{1}', ContentParams: [{1} = TotalOrders], RenderMode: H2)
  }
}
mxcli check script.mdl -p app.mpr --references
# ✓ All references valid  ← should warn or fail

Expected Behavior

Either:

  1. Reference validation should warn that TotalOrders (Integer) needs toString() wrapping for DYNAMICTEXT ContentParams
  2. Or mxcli should automatically emit the correct binding syntax toString($currentObject/TotalOrders) when the attribute type is non-String

Correct Syntax

DYNAMICTEXT txt (Content: '{1}', ContentParams: [{1} = toString($currentObject/TotalOrders)], RenderMode: H2)

Context

The create-page.md skill documentation states that AttrName works in DataView context for ContentParams, but this only holds for String-type attributes. Non-String types (Integer, Decimal, DateTime, Boolean) require explicit toString($currentObject/AttrName) syntax. This gap in documentation + validation causes AI agents to generate pages that pass all checks but fail at runtime.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions