Troubleshooting Perspective Custom Properties: Accessing Members

Karen Mitchell2 min read
HMI ProgrammingOther ManufacturerTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Document tag members and document custom property members do not expose the same binding path. The reported document tag structure nests members under value, while custom property members do not. Therefore, do not assume that member syntax valid for a document tag also works for a document custom property.

Distinguish the Two Property Shapes

Data source Reported structure Supported access path in the evidence
Document tag Members nested under value Direct member access is reported as available
Document custom property Members are not nested under value Bind the custom property, then extract its member with an expression transform

The requested shorthand was:

UDTi_or_Atomic_tagPath.custom_prop["member"]

The evidence asks whether this syntax can behave like document_tag["member"], but it does not confirm that such direct access is supported. Treat it as unavailable until the configured binding accepts the path and returns the expected member.

Read a Document Custom Property Member

The evidence-supported method uses a tag binding for the complete custom property and an expression transform to select the required member. This applies to structures such as a bool_state document custom property containing user-facing strings for Boolean states.

  1. Create a tag binding that reads the document custom property.
  2. Add an expression transform that extracts the required member from the returned object.
  3. Test both Boolean states and confirm that the corresponding string reaches the target property.

Preserve and Verify Value Quality

The square-bracket operator is reported to discard the quality associated with the retrieved value. The discussion also reports that Perspective can discard nested qualities while constructing its internal property representation, although behavior differs among script transforms, expression structure bindings, lists, mappings, and bindings to an existing parent object.

Do not infer quality preservation merely because the nested value is present. Verify the value and its quality at the final consumer. If downstream logic depends on quality, bind or inspect the individual child value instead of relying on quality nested inside a reconstructed parent object.

Choose Between Passed Data and Tag Reads

A reusable view may receive static tag properties through instanceData in a Flex Repeater or through rowData in an embedded table cell. The evidence does not establish whether recursive tag queries, per-row queries, or indirect tag bindings are universally lighter. Select the method by measuring the actual query scope and number of tag reads in the project.

When inputs can arrive through multiple embedding methods, coalesce them into one custom property object and have downstream bindings reference that object. Initialize and test null cases explicitly, because the reported static null bindings are not always replaced during view initialization.

FAQ

Can a document custom property member be accessed directly in a tag binding?

The evidence does not confirm direct support for custom_prop["member"]. Bind the complete custom property and use an expression transform to extract the member.

Does square-bracket member access preserve tag quality?

No. The reported behavior is that the square-bracket operator discards the quality of the retrieved value, so verify quality separately when downstream logic depends on it.

Should a reusable Perspective view use instanceData or rowData?

Support each required embedding method, then coalesce its inputs into one custom object for downstream bindings. Test null initialization and replacement because static null bindings are reported not to be overridden in every scenario.

Back to blog