Skip to main content

Metadata (ViewMetadata)

The ViewMetadata node on a view contains the embedded query definition that drives the view's data sources, joins, ranges, and sort orders. It is an AxQuerySimple object — the same type used by standalone AOT queries — but defined inline within the view rather than as a separate AOT element.

If the view's Query property references a standalone AOT Query, the ViewMetadata is populated from that query automatically. If no external query is referenced, the ViewMetadata is where developers define data sources manually.

note

The embedded query structure is identical to a standalone AOT query. This page covers the properties specific to the ViewMetadata context. Comprehensive coverage of query objects — including data sources, ranges, relations, grouping, ordering, and union queries — is available on the dedicated Queries page.


Structure Overview

The ViewMetadata follows this hierarchy:

ViewMetadata (AxQuerySimple)
└── DataSources (AxQuerySimpleRootDataSource)
├── Fields (AxQuerySimpleDataSourceField)
├── Ranges (AxQuerySimpleDataSourceRange)
├── GroupBy (AxQuerySimpleGroupByField)
├── Having (AxQuerySimpleHavingPredicate)
├── OrderBy (AxQuerySimpleOrderByField)
└── DataSources (AxQuerySimpleEmbeddedDataSource) ← nested/joined data sources
├── Fields
├── Ranges
└── DataSources ← further nesting for multi-table joins

The root data source is the primary table the view reads from. Additional tables are added as embedded data sources nested underneath, each with a JoinMode that controls how records are combined.


Data Sources

Root Data Source

The root data source (AxQuerySimpleRootDataSource) identifies the primary table and supports additional clauses for grouping, ordering, and having.

Embedded Data Sources

Each embedded data source (AxQuerySimpleEmbeddedDataSource) represents a joined table. Key properties:

PropertyTypeDescription
JoinModeJoinMode_ITxtHow the data source joins to its parent. Values: InnerJoin (0), OuterJoin (1), ExistsJoin (2), NoExistsJoin (3).
FetchModeFetchMode_ITxtHow linked records are fetched. Values: OneToOne (0), OneToN (1).
UseRelationsNoYesWhether to use AOT-defined relations for the join condition. Values: No (0), Yes (1).

When UseRelations is Yes, the join condition is derived from the relations defined between the tables in the AOT. When No, custom relations are defined inline under the data source's Relations node.

Embedded data sources can be nested to any depth, enabling multi-table join chains.


Properties

33/33 properties
PropertyDisplay NameTypeDescription
QueryAxQuerySimple
QueryTypeQuery TypeQueryTypeType of query. Values: Join (0), Union (1).
TitleTitleStringTitle of the query.
DescriptionDescriptionStringDescriptive help text for the query.
FormFormStringForm associated with the query.
UserUpdateUser UpdateNoYesWhether the user may modify the query. Values: No (0), Yes (1).
LiteralsLiteralsSqlLiteralMode_ITxtHow literals are represented in SQL statements. Values: Default (0), ForceLiterals (1), ForcePlaceholders (2).
InteractiveInteractiveNoYesWhether the query may open dialogs. Values: No (0), Yes (1).
AllowCheckAllow CheckNoYesWhether security checking occurs before or after the form opens. Values: No (0), Yes (1).
SearchableSearchableNoYesWhether query results are searchable. Values: No (0), Yes (1).
AllowCrossCompanyAllow Cross CompanyNoYesWhether the query aggregates data across all companies. Values: No (0), Yes (1).
ImportableImportableNoYesWhether the query is importable. Values: No (0), Yes (1).
Data SourceAxQuerySimpleDataSource
NameNameStringThe name of the data source.
TagsTagsStringTags for this element separated by semicolon.
TableTableStringThe table, view, or data entity that supplies data for this data source.
LabelLabelStringDescriptive label for the data source.
CompanyCompanyStringSpecific company context for this data source.
FirstOnlyFirst OnlyNoYesWhether only the first record should be selected. Values: No (0), Yes (1).
FirstFastFirst FastNoYesWhether to retrieve the first record faster than subsequent records. Values: No (0), Yes (1).
AllowAddAllow AddNoYesWhether the user may add fields for search. Values: No (0), Yes (1).
UpdateUpdateNoYesWhether the cursor can update records. Values: No (0), Yes (1).
EnabledEnabledNoYesWhether the data source is enabled. Values: No (0), Yes (1).
SelectWithRepeatableReadSelect With Repeatable ReadNoYesWhether the data source uses a repeatable read hint. Values: No (0), Yes (1).
ConcurrencyModelConcurrency ModelConcurrencyModelConcurrency model for the data source. Values: Auto (0), Optimistic (1), Pessimistic (2).
UnionTypeUnion TypeUnionTypeType of union for this data source. Values: None (0), Union (1), UnionAll (2).
DynamicFieldsDynamic FieldsQueryFieldListDynamicWhether fields are dynamically selected. Values: No (0), Yes (1), Unselected (99).
PolicyContextPolicy ContextStringPolicy context for the data source.
IsReadOnlyIs Read OnlyNoYesWhether the data source is read-only. Values: No (0), Yes (1).
ApplyDateFilterApply Date FilterNoYesWhether the data source is filtered for date effectivity. Values: No (0), Yes (1).
ValidTimeStateUpdateValid Time State UpdateValidTimeStateUpdateType of update for date-effective records. Values: CreateNewTimePeriod (1), Correction (2), EffectiveBased (3).
ChangeTrackingEnabledChange Tracking EnabledNoYesWhether the data source participates in change tracking. Values: No (0), Yes (1).
Embedded Data SourceAxQuerySimpleEmbeddedDataSource
JoinModeJoin ModeJoinMode_ITxtHow the data source joins to its parent. Values: InnerJoin (0), OuterJoin (1), ExistsJoin (2), NoExistsJoin (3).
FetchModeFetch ModeFetchMode_ITxtHow linked records are fetched. Values: OneToOne (0), OneToN (1).
UseRelationsUse RelationsNoYesWhether to use AOT-defined relations for the join condition. Values: No (0), Yes (1).