<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META content="MSHTML 6.00.2800.1498" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>I have written a
scrip that states following:</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>Description: Add
Department to Ticket</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>Condition: On
Create</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>Action: User
Defined</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>Template: Global
Template: Blank</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>Stage: Transaction
Create</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>Custom condition:
none</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>Custom action
preparation code: return 1;</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>Custom action
cleanup code:</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial
size=2>$RT::Logger->debug( "COGR - testscript #21");</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>my $people =
$Ticket->Requestors->UserMembersObj;<BR>my $requestor=$people->Next ||
undef</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>my $department =
"unknown";</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>if ($requestor)
{<BR> $UserObj->Load($requestor->id);<BR> $department =
$UserObj->FirstCustomFieldValue('Department');<BR>}<BR>$RT::Logger->debug(
"COGR - testscript #21 for department: $department");</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>return
undef;<BR></FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial
size=2>=========================================================</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>Now I want to fetch
the "Requestors" field of a new ticket with this on create scrip, then lookup
that</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>requestor and grab a
custom field (Department) and then place it in another</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>object related to
the ticket called "DepartmentTicket".</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>However, $Ticket
doesnt yet exist (at least I dont think so), so how would I go about
grabbing</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial size=2>the requestor field
from the Create.html file?</FONT></SPAN></DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=642332519-12072005><FONT face=Arial
size=2>Thanks,</DIV></FONT></SPAN>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><SPAN style="FONT-FAMILY: times new roman"><FONT face=Arial
size=2>T.J. Maciak</FONT></SPAN></DIV><SPAN
style="FONT-FAMILY: times new roman">
<DIV align=left><BR><FONT face=Arial size=2>Internet/Intranet
Developer<BR>Department of IT<BR>City of Grand Rapids<BR>P:
(616)456-3713</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>F:
(616)456-3448<BR><BR></DIV></FONT></SPAN>
<DIV> </DIV></BODY></HTML>