Skip to main content
Hallo

I want to count number of times a particular field called abholort is repeated and display it in the vf page table.

Apexcode:

public List<String> ShowSuggestions = new List<String>();

public List<String> getSuggestions() {

ShowSuggestions = [select Abholort__c, COUNT(Name) from Fahrzeuge__c

GROUP BY Abholort__c ];

return ShowSuggestions;

}

VF page

<apex:pageBlockTable value="{!Suggestions}" var="showsugg" >

<apex:column value="{!showsugg.COUNT(Name)}" />

<apex:column value="{!showsugg.Abholort__c}" />

</apex:pageBlockTable>

I am getting an error of Illegal assignment from list to list. Can anybody let me know where am I wrong.

Thanks.

 
1 Antwort
0/9000