You need to sign in to do that
Don't have an account?
Ramkumar Murugesan
Agreegate results need to be compared with results
Hi Team,
I had issue with processing the results of agreegate query. I want to display the values and counts of whichdoesnt existing in the picklist field value.
When the agreegate result should not contain the values of availablepicklist values.
This is not working fine as per query. Can you please help on this.
I had issue with processing the results of agreegate query. I want to display the values and counts of whichdoesnt existing in the picklist field value.
When the agreegate result should not contain the values of availablepicklist values.
This is not working fine as per query. Can you please help on this.
void checkPickListValues(){ if(selectedField != null && selectedObject != null){ UsedPicklistValues = new List<String>(); String qryStr = 'Select ' + selectedField + ' pData, count(Id) tCount From ' + selectedObject + ' GROUP BY ' + selectedField; AggregateResult[] groupedResults = Database.Query(qryStr); Summaries = new List<Summary>(); for (AggregateResult ar : groupedResults){ system.debug(' ar ==>'+ar); UsedPicklistValues.add((String)ar.get('pData')); for (String availablepickval: PicklistValues){ if(ar.get('pData') != availablepickval && ar.get('pData')!= null ){ Summaries.add(new Summary((String)ar.get('pData'),(Integer)ar.get('tCount'))); } } }