This code seems to work just fine for what I'm trying to do (find all Task
ID's that are associated with CRQ000000032100).   Thanks for all that had a
look a this.



#!/usr/bin/perl

use ARS;
$server = "remedy.example.com";
$login = "myloginid";
$passwd = "mypw";
$port = "10005";
# login to the ARServer
($ctrl = ars_Login($server, $login, $passwd, "", "", $port)) || die "Can't
login to the server: $ars_errstr\n";
if(!(@formlist = ars_GetListSchema($ctrl, 0, 1+1024))) {
   die "ars_GetListSchema(): $ars_errstr\n";
}

$crqnum = "CRQ000000032100";
$schema = "TMS:Task";
$qs = qq/'10000006' = "$crqnum"/;
( $lq = ars_LoadQualifier( $ctrl, $schema, $qs ) ) || die( "LoadQualifier
Failed: $ars_errstr" );

%entries = ars_GetListEntry($ctrl, $schema, $lq, 0, 0);
foreach $entry_id (sort keys %entries) {
   @taskid = split /\|/, "$entry_id";
   @restofvalues = split /     /, $entries{$entry_id};
   $taskname = $restofvalues[0];
   print "TaskID: $taskid[0]\t TaskName: $taskname\n";
}

ars_Logoff($ctrl);

Result:
TaskID: TAS000000053225  TaskName: task#1
TaskID: TAS000000053226  TaskName: task#2
TaskID: TAS000000053227  TaskName: task#3
TaskID: TAS000000053228  TaskName: task#4




--
View this message in context: 
http://ars-action-request-system.1.n7.nabble.com/arsPerl-TMS-Task-and-CHG-Infrastructure-Change-tp119230p119255.html
Sent from the ARS (Action Request System) mailing list archive at Nabble.com.

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to