This may be somewhat related to the old "Sorting Weirdness" thread, but it didn't provide a clear answer and I'm hoping I might be able to find a solution. We are building a report from a custom object. One of our fields uses a float data type, and we need to be able to sort by that field.
If any one of the fields has a null value, the entire report fails to display. (We have since solved for null values)
If any of the values contains no decimal places, the entire report fails to display.
If we remove the $sorter.sort() functionality, the report displays, though it is not ordered correctly.
Our input source data contains 2 decimal spaces for all values, but upon import, when these spaces contain '0', Marketo automatically drops them. (10.50 becomes 10.5, 10.00 becomes 10) Is there any way to force these values to contain 2 decimal spaces prior to sorting?
#foreach( $object in $sorter.sort($list_cList, "Send_Date:desc")) #if( $foreach.count > 1 ) #break #end #set ($maxDate = $object.Send_Date) #end #set( $qualifyingCampaigns = [] ) #foreach( $Campaign in $list_cList ) #if( $Campaign.Campaign_ID.equals("FILTER_VALUE_A") && $Campaign.Send_Date.equals($maxDate) ) #set( $void = $qualifyingCampaigns.add($Campaign) ) #set( $CID = $Campaign.Campaign_ID ) #end #end #if( $CID.equals("FILTER_VALUE_A")) ## Display list items - If Amount_Allocated_Percent_Change is null or does not contain decimal, report will not display #foreach( $Campaign in $sorter.sort($qualifyingCampaigns, "Amount_Allocated_Percent_Change") ) <tr> <td style= " border: 1px solid #dddddd; padding: 6px; line-height: 1.5; text-align: center; vertical-align: middle; " > $Campaign.Policy_Number </td> <td style= " border: 1px solid #dddddd; padding: 6px; line-height: 1.5; text-align: center; vertical-align: middle; " > $Campaign.Policy_Annuitant </td> <td style= " border: 1px solid #dddddd; padding: 6px; line-height: 1.5; text-align: center; vertical-align: middle; " > $Campaign.Allocation_Option </td> <td style= " border: 1px solid #dddddd; padding: 6px; line-height: 1.5; text-align: center; vertical-align: middle; " > $Campaign.Next_Anniversary </td> <td style= " border: 1px solid #dddddd; padding: 6px; line-height: 1.5; text-align: center; vertical-align: middle; " > $Campaign.Amount_Allocated_Percent_Change% </td> <td style= " border: 1px solid #dddddd; padding: 6px; line-height: 1.5; text-align: center; vertical-align: middle; " > #if($Campaign.Percent_Cap_Change)$Campaign.Percent_Cap_Change%#end </td> <td style= " border: 1px solid #dddddd; padding: 6px; line-height: 1.5; text-align: center; vertical-align: middle; " > #if($Campaign.Upper_Lock)$Campaign.Upper_Lock%#end </td> <td style= " border: 1px solid #dddddd; padding: 6px; line-height: 1.5; text-align: center; vertical-align: middle; " > #if($Campaign.Lower_Lock)$Campaign.Lower_Lock%#end </td> </tr> #end #end
... View more