I have a pageblocktable in which i am displaying statuses(Open,InProcess,Closed)
.but in object the Status__c
field is picklist(stores 12 statuses like stat1,stat2,stat3 comes in Open
Status sta4,stat5....stat10 comes under InProces
s Status,and stat11,stat12 in Closed
status).
The table should looks like
Category TotalRecords Open InProcess Closed
cat1 8 2 1 5
cat2 5 3 2 0
I am getting data group by Category__c field and Counting the Records which gives correct data,but how can i arrange the values in Status__c field to (Open,InProcess,Closed).
class:
public List<Data> dt{get;set;}
public class Data
{
public AggregateResult ar {get; set;}
public String Status{get { return (string)ar.get('status'); }}
public decimal Open { get;set;}
public decimal InProcess { get;set;}
public decimal Closed{ get;set;}
}
I am getting data and assigning to the list dt
. based on the property status
i need to assign values to Open,InProcess,Closed.
I tried iterating through the list dt
.and checking Status
value and assign to the (Open,InProcess,Closed) which is not giving the correct result.
Please help.
Thanks in advance