Monday, 13 January 2020

Fetch Xml,Group by Date field and then sort by same Date field


Get Latest records by ab_effectivedate field and aggregate EarnCode decimal field.

<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' aggregate='true'> <entity name='ab_deductionfringes'>
<attribute name='ab_effectivedate' alias='EffectiveDateYear' groupby='true' dategrouping='year'/>
<attribute name='ab_effectivedate' alias='EffectiveDateMonth' groupby='true'dategrouping='month'/>
<attribute name='ab_effectivedate' alias='EffectiveDateDay' groupby='true' dategrouping='day'/>
<attribute name='ab_earncode' alias='EarnCode' aggregate='sum' />
<order alias='EffectiveDateYear' descending='true' />
<order alias='EffectiveDateMonth' descending='true' />
<order alias='EffectiveDateDay' descending='true' />
 <filter type='and'>
  <condition attribute='ab_union' operator='eq'  uitype='ab_union' value='" + unionId + @"' />
   <condition attribute='ab_trade' operator='eq'  uitype='ab_trade' value='" + tradeId + @"' />
   <condition attribute='statecode' operator='eq' value='0' />
   <condition attribute='ab_effectivedate' operator='not-null' />
 </filter>
 </entity>
</fetch>

No comments:

Post a Comment

Read only field , get latest value from read only field in in power app portal

Below line is used to make field readonly in power app portal through js $( "#bdo_relationshiprole_name" ).parent().css( "po...