function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
parasparas 

Popular Tags

Hi ,
 
I have a requirement as such : i want to to display only those tags on my page which are present for more than two vendors (we have  accounts as vendors ). I tried using 2 approach but was not successful
1.i tried getting all the tags in a list of type Sobject(AccountTags) then i ma trying to store those tags to a string list
as i  need to sort them and my code as such :
 
public List<String> getTags()
{
List<AccountTag> list1= [select Name from AccountTag];
List<String> list2= new List<String>();
for(Integer j=0;j<list1.size();j++)
{
System.debug('string='+list1[j].Name);
list2.add(list1[j].Name);
}
list2.sort();
for( Integer i=0;i<list1.size();i++)
{
if(i==0)
{
tempstr=str;
}
else
result=tempstr.compareTo(str);
if(result== 0)
{
list2.add(str);
count++;
}
}
return list2;
}
 
But i am getting an error saying :"
Error: Unknown property 'String.Name";
Please anyone tell me the solution to this problem


Message Edited by paras on 11-20-2008 07:32 PM