<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>I have setup the Queue with a custom field called 'Country' and created a queue with country populated with 'United States'.</div>
<div>
<div><br>
</div>
<div>Then, I am using the following code snippet to select this Queue based on the custom Country field value in Queue.</div>
<div><br>
</div>
<div>$cfCountryQ = RT::CustomField->new(RT->SystemUser);</div>
<div>$cfCountryQ->LoadByName(Name => 'Country');</div>
<div><br>
</div>
<div>$splQueues = RT::Queues->new(RT->SystemUser);</div>
<div>$splQueues->LimitCustomField (CustomField => $cfCountryQ->id, Value => 'United States');</div>
<div><br>
</div>
<div>while (my $splQueue = $splQueues->Next) {</div>
<div> print ("inside the loop\n");</div>
<div> print ($splQueue->Name);</div>
<div>}</div>
<div><br>
</div>
<div>The control does not go inside the loop. I am wondering what is that I am doing wrong here..</div>
<div><br>
</div>
<div>~
</div>
<div>~
</div>
<div>~
</div>
<div>~
</div>
<div>~ </div>
</div>
</body>
</html>