<div dir="ltr">Values within quotes are taken literally:<br><br>'$self->TransactionObj->CreatorObj->City'<br><div><br></div><div>means output "$self->TransactionObj->CreatorObj->City".  Removing the quotes:</div>
<div><br></div><div>$self->TransactionObj->CreatorObj->City<br></div><div><br></div><div>means output the resultant value of that, and should therefore have the desired effect.</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 18 July 2014 23:20, Thomas, Adam (Lakefield) <span dir="ltr"><<a href="mailto:Adam.Thomas@sgs.com" target="_blank">Adam.Thomas@sgs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-CA" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1f497d">Thank you for the response, forgive me I am new at this, very new…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1f497d">$self->TicketObj->AddCustomFieldValue( Field => 'location', Value => '$self->TransactionObj->CreatorObj->City' );<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1f497d">Is the code I have and it is literally putting in just the line. Where do I need to correct my syntax?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#ff6600">Adam Thomas</span></b><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#ff6600"><u></u><u></u></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black">SGS Canada<u></u><u></u></span></b></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black">Application Support - Big Machines Development<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black"><u></u> <u></u></span></p><p class="MsoNormal"><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Calibri","sans-serif";color:black">SGS Canada<u></u><u></u></span></b></p>
<p class="MsoNormal"><span lang="FR-SN" style="font-size:8.0pt;font-family:"Calibri","sans-serif";color:black">Phone: +1-705-652-2000 ext 2505<u></u><u></u></span></p><p class="MsoNormal"><span lang="FR-SN" style="font-size:8.0pt;font-family:"Calibri","sans-serif";color:black">Cell: +1-705-957-1618<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="FR-SN" style="font-size:8.0pt;font-family:"Calibri","sans-serif";color:black">E-mail: </span><span lang="FR" style="font-size:8.0pt;font-family:"Calibri","sans-serif";color:#ff6600"><a href="mailto:Jessica.martin@sgs.com" title="mailto:Jessica.martin@sgs.com" target="_blank"><span lang="FR-SN" style="font-family:"Arial","sans-serif";color:#ff6600">adam.thomas@sgs.com</span></a> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Alex Peters [mailto:<a href="mailto:alex@peters.net" target="_blank">alex@peters.net</a>] <br>
<b>Sent:</b> July-18-14 9:10 AM<br><b>To:</b> Thomas, Adam (Lakefield)<br><b>Cc:</b> <a href="mailto:rt-users@lists.bestpractical.com" target="_blank">rt-users@lists.bestpractical.com</a><br><b>Subject:</b> Re: [rt-users] How can you use requestor info in custom field<u></u><u></u></span></p>
</div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">You can do this with a scrip which fires on ticket creation, accesses the user's relevant location information, then puts it in the ticket's custom field.<u></u><u></u></p>
<div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">
The location information of the user creating the ticket can be accessed in scrip code via:<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">
<u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">$self->TransactionObj->CreatorObj->Organization<u></u><u></u></p></div><div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">$self->TransactionObj->CreatorObj->Address1<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">
$self->TransactionObj->CreatorObj->Address2<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">$self->TransactionObj->CreatorObj->City<u></u><u></u></p>
</div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">$self->TransactionObj->CreatorObj->State<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">
$self->TransactionObj->CreatorObj->Zip<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">$self->TransactionObj->CreatorObj->Country<u></u><u></u></p>
</div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt"><br>A ticket's custom field can be modified in scrip code via:<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">
<u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">$self->TicketObj->AddCustomFieldValue( Field => 'location', Value => '...' );<u></u><u></u></p>
</div></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:35.45pt"><u></u> <u></u></p><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">
On 17 July 2014 22:51, AdamThomas <<a href="mailto:adam.thomas@sgs.com" target="_blank">adam.thomas@sgs.com</a>> wrote:<u></u><u></u></p><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt">
When a ticket is emailed in I want the requestors location to be auto<br>populated into my custom field "location".<br><br>My user profile automatically detects their location in their user profile<br><br><br><br>
--<br>View this message in context: <a href="http://requesttracker.8502.n7.nabble.com/How-can-you-use-requestor-info-in-custom-field-tp57959.html" target="_blank">http://requesttracker.8502.n7.nabble.com/How-can-you-use-requestor-info-in-custom-field-tp57959.html</a><br>
Sent from the Request Tracker - User mailing list archive at Nabble.com.<br><span><span style="color:#888888">--</span></span><span style="color:#888888"><br><span>RT Training - Boston, September 9-10</span><br><span><a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a></span></span><u></u><u></u></p>
</div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:0cm;margin-left:35.45pt;margin-bottom:.0001pt"><u></u> <u></u></p></div></div></div></div>Information in this email and any attachments is confidential and
intended solely for the use of the individual(s) to whom it is addressed
or otherwise directed. Please note that any views or opinions presented
in this email are solely those of the author and do not necessarily
represent those of the Company.
Finally, the recipient should check this email and any attachments for
the presence of viruses. The Company accepts no liability for any damage
caused by any virus transmitted by this email.
All SGS services are rendered in accordance with the applicable SGS
conditions of service available on request and accessible at
<a href="http://www.sgs.com/en/Terms-and-Conditions.aspx" target="_blank">http://www.sgs.com/en/Terms-and-Conditions.aspx</a>
</div></blockquote></div><br></div>