Share via


SysQuery::addDimensionAttributeFilter Method [AX 2012]

Adds the appropriate joins and filters to the query to filter results by a specific dimension attribute and value.

Syntax

client server public static QueryFilter addDimensionAttributeFilter(
    Query _query, 
    str _dataSourceName, 
    str _dimensionFieldName, 
    DimensionComponent _dimensionComponent, 
    anytype _value, 
   [str _dimensionAttributeName])

Run On

Called

Parameters

  • _dataSourceName
    Type: str
    The name of the data source that contains the dimension information.
  • _dimensionFieldName
    Type: str
    The name of the field on the data source that contains the dimension information.
  • _value
    Type: anytype
    The value to which results should be restricted.
  • _dimensionAttributeName
    Type: str
    The name of the dimension attribute for which the value should be applied.

Return Value

Type: QueryFilter Class
The QueryBuildRange class that is used to restrict the query.

Remarks

If no dimension attribute name is specified and the field is a ledger dimension. Then the query will restrict based on the denormalized combination string. If a value is not specified and the field is not an enumeration dimension. Then the query will restrict to only records that contain no value for the specified dimension.

See Also

Reference

SysQuery Class