How to display only one attribute value from DefaultDimension

In this post, I will explain how to display only one attribute value from DefaultDimension. I will use CostCenter attribute for my example. As you know DefaultDimension tables are DimensionAttributeValueSet and DimensionAttributeValueSetItem . This tables holds the related data. I wil use only DimensionAttributeValueSetItem table.
I have a DafaultDimension’s RecId end i want to display only CostCenter value. I will join DimensionAttributeValue to DimensionAttributeValueSetItem and give the ranges.

Here is the method displays costCenter values.

// FD: Display CostCenter Value from DefaultDimension
display num dispDefaultDisplayValue()
    DimensionAttributeValue            dimAttrValue;
    DimensionAttributeValueSetItem dimAttrValueSetItem;

    select firstonly dimAttrValueSetItem
    where dimAttrValueSetItem.DimensionAttributeValueSet == this.DimensionDefault
    join dimAttrValue
        where dimAttrValue.RecId == dimAttrValueSetItem.DimensionAttributeValue
        &&    dimAttrValue.DimensionAttribute   == 5637144851;
        // CostCenter RecId. Must be parametric.

    return dimAttrValueSetItem.DisplayValue;


I wrote this method to a table that have DimensionDefault field.

Until next time.

Comment are closed.