Hi
i want to display one single financial dimension (from a set of 5 ) in a grid
Anyone can give me a hint .. guess is simple .. but im not a dev guy
thx
Pirmin
*This post is locked for comments
Hi ArneChristensen
The code you suggest is just display the dimension value, not the description of the financial dimension
Can you show how to do it if I want to display the description as well?
Thanks and Regards,
Enggar
Thank you this helped me in a requirement today.
You can do it quite simple like this:
Add this display method behind InventTable (..or behind whatever table you want to pull from)
display ItemGroupId getDimensionDepartment()
{
DimensionAttributeValueSetStorage dimStorageProduct;
DimensionValue productDepartment;
;
// Get current Department financial dimension from the product
dimStorageProduct = DimensionAttributeValueSetStorage::find(this.DefaultDimension);
productDepartment = dimStorageProduct.getDisplayValueByDimensionAttribute(DimensionAttribute::findByName('Department').RecId);
return productDepartment;
}
Its really bit Techy. For example if you get Top one value for Default DemensionValue for Vendor then have to Add Display method in Vendor table. Display method return the value of extend data type. So in Extended Data Type of Displayname is “DimensionValue.“ for DimensionAttributeValueSetItem
display DimensionValue getDefaultDepartmentValue()
{
VendTable vendTable;
DimensionAttributeValueset dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
DimensionValue dimValue;
select firstOnly dimAttr
where dimAttr.Name=="Department";
while select firstonly1 * from vendTable
order by DimAttrValueSetItem.DisplayValue desc
join dimAttrValueSet
where dimAttrValueSet.RecId== vendTable.DefaultDimension
join dimAttrValueSetItem
where dimAttrValueSetItem.DimensionAttributeValueSet==dimAttrValueSet.RecId
join dimAttrValue
where dimAttrValueSetItem.DimensionAttributeValue==dimAttrValue.RecId
&& dimAttrValue.DimensionAttribute== dimAttr.RecId
{
dimValue=dimAttrValueSetItem.DisplayValue;
}
return dimValue
}
After compile the Vendor table. This method is available VendTable datasource. Now drop a string Edit on Grid and set the DataSource property for the control to the VendTable and Set the DataMethod property to the name of the display method “getDefaultDepartmentValue”.
You can modify display Method logic as per your requirement.
Hi,
The method I know of doing this is to write a display method (msdn.microsoft.com/.../aa595058.aspx) based on theDefaultDimension. The table linkage would be like the example here (domhk.blogspot.hk/.../ax2012-sort-records-by-default-dimension_18.html)
So it's a bit techy actually. :)
Regards
Mohamed Amine Mahmoudi
100
Super User 2025 Season 1
Community Member
48
Zain Mehmood
6
Moderator