Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2022 Release Wave 2Check out the latest updates and new features of Dynamics 365 released from October 2022 through March 2023
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I want to apply query range on dimension 2. All possible ways work with dimension but it did not work with dimension.
I want to pass dynamic string to dimRange.Value. which will contain two columns on which i will set range. So, while declaring dimRange i declared it for any other column and i mension columnName==[Value] in 'QueryRange.Value'. But for dimension it fails.
I also refered this link: http://www.axaptapedia.com/Talk:Expressions_in_query_ranges
bellow code i am trying out:
dimRange = EmplTable_ds.query().dataSourceTable(tablenum(EmplTable)).addRange(fieldnum(EmplTable, CurrentFacility));
dimRange.value(strFmt('(%1=="%2")',fieldId2Ext(fieldNum(EmplTable, Dimension),2), "PSDU4"));
Try doing this instead, should be a bit easier:
dimRange = EmplTable_ds.query().dataSourceTable(tablenum(EmplTable)).addRange(fieldid2Ext(fieldnum(EmplTable, Dimension), 2));
hey thanks for quick reply. Life is easy because of people like you :)
if i want to set range on only on dimension it works perfect.
what if i want to set range as:
dimRange.value(CurrentFacility=='XYZ' || dimension2 =='PSDU4')
I got the answer......
for applying range on two columns out of which one is dimension2
e.g. dimRange.Value(CurrentFacility=='xyz' || dimension2=='PSDU4');
here is the answer:
dimRange = EmplTable_ds.query().dataSourceTable(tablenum(EmplTable)).addRange(fieldnum(EmplTable, CurrentFacility)); // mention any column
range = strfmt (
'( (%1 ==%2) || (%3.%4==%5))'
, fieldid2name(tablenum(EmplTable), fieldid2ext(fieldnum(EmplTable, Dimension), Dimensions::code2ArrayIdx(SysDimension::Center)))
and it's done !!!!!!!!!!!
Business Applications communities