[rt-users] Problem with iterating groups
    Jason Fenner 
    jfenner at vitamix.com
       
    Thu Apr 26 15:31:41 EDT 2007
    
    
  
I am trying to iterate over the names of groups with this code piece:
use RT::Groups;
         my $groups = new RT::Groups($user);
         $groups->LimitToUserDefinedGroups();
         print $groups->Count . "\n";
         while (my $group = $groups->Next) {
            #print $group->Id ." is a group id\n";
            print $group->Name;
         }
For some reason the while loop keeps resulting in false and is never 
run.  However, I know that I do have groups because that Count method is 
returning the number 7.  Does anyone know why I can't iterate?
Thanks,
--Jason
    
    
More information about the rt-users
mailing list