Native FormCalc Data Properties

Native Runtime FormCalc events can read and write the semantic isNull, contentType and contains properties of ordinary element-backed Data values without enabling JavaScript or installing a script provider

Direct member assignment and setAttribute(value, propertyName) use the same typed Data operations, so semantic properties do not become unrelated raw XML attributes

PropertyAccepted writesEffect
isNull1, 0, "1", "0", "true", "false"True clears the stored value and establishes XML Schema nil markup; false establishes explicit non-nil markup and preserves ordinary content
contentTypeA MIME string, or an empty string to clear itUpdate the qualified Data MIME annotation; the getter reads semantic MIME state rather than a similarly named unqualified XML attribute
contains"data" or "metaData"Use the typed element/metadata representation operation, preserving the semantic value and refreshing bound fields

Nullness and MIME examples

xfa.datasets.data.main.item.isNull = 1
this.parent.marker.rawValue = xfa.datasets.data.main.item.getAttribute("isNull")

xfa.datasets.data.main.item.setAttribute("text/rtf", "contentType")

A MIME write changes the annotation; it does not convert plain text into a rich-text document

A wildcard assignment such as xfa.datasets.data.main.item[*].isNull = 1 processes every selected receiver through the same operation budget and transaction

Metadata representation

Converting an eligible Data value to metaData stores its value as an attribute of its parent and preserves the value seen by an accepted bound field

The shared namespace rules still apply: a metadata attribute cannot use the reserved XFA Data directive namespace, so a conversion must start from an eligible ordinary XML name and namespace

Observe converted content through saved XML, refreshed bindings or the published Data child projection; a conversion can change which object identities remain live

Ordinary Form members and explicit setters

Form fields named contains, contentType or isNull retain ordinary child assignment, including repeated parent selections; a missing child does not redirect the write to a similarly named ancestor

Explicit setAttribute calls on Form or Template receivers retain their existing attribute semantics and do not become child-field assignments

Limits and rollback

Data groups and model roots do not acquire DataValue-only writable properties; invalid boolean or contains spellings, invalid representation conversions and value-budget exhaustion fail through the existing typed operation checks

A later failure restores earlier semantic writes byte-for-byte as part of the event transaction, including field synchronization and XML markup

Related APIs

XFA Data DOM, Typed Data structure operations, Native FormCalc node lists and Interactive XFA runtime