What populates RequestingUnit? You are probably not using ExtractCustomFieldValues for that.<br><br><div class="gmail_quote">On Mon, Oct 25, 2010 at 10:04 AM, Francis L Fabrizio <span dir="ltr">&lt;<a href="mailto:fabrizio@uab.edu">fabrizio@uab.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">








<div lang="EN-US" link="blue" vlink="purple">

<div>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Unless I misunderstand what you are asking, I think this
actually does work.  Here’s part of a template I did yesterday:</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">-----------------</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">This unowned ticket has just been assigned to the {</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">if ($Transaction-&gt;Type eq &quot;Create&quot;) {</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">     $OUT .=
$Ticket-&gt;FirstCustomFieldValue(&quot;RequestingUnit&quot;);</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">   } else {</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">     $OUT .= $Transaction-&gt;NewValue();</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">   }</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">} Area of Responsibility.  Please review this ticket and take or
assign ownership as appropriate.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">-------------------</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">The RequestingUnit value gets populated appropriately when doing
a Create transaction, which means that the call to FirstCustomFieldValue()
worked.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Is that not what you are trying to do?</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">-Fran</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">PS – The purpose of my template is to notify certain people when
RequestingUnit is first populated or is changed, hence the branching logic.  I
think I had to call NewValue() in the case of a CustomField transaction because
FirstCustomFieldValue was giving me the old value instead of the new one… I can’t
quite recall, but in any case, calling FirstCustomFieldValue() from a template
appears to be working fine.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">

<div>

<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">

<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:rt-devel-bounces@lists.bestpractical.com" target="_blank">rt-devel-bounces@lists.bestpractical.com</a>
[mailto:<a href="mailto:rt-devel-bounces@lists.bestpractical.com" target="_blank">rt-devel-bounces@lists.bestpractical.com</a>] <b>On Behalf Of </b>Todd
Chapman<br>
<b>Sent:</b> Sunday, October 24, 2010 10:57 AM<br>
<b>To:</b> RT developers<br>
<b>Subject:</b> [Rt-devel] Question about rt-extension-extractcustomfieldvalues
design</span></p>

</div>

</div><div class="im">

<p class="MsoNormal"> </p>

<p class="MsoNormal">Is there some reason extractcustomfieldvalues does it&#39;s
work in Commit instead of Prepare? I would think it fairly common to want to
use { $Ticket-&gt;FirstCustomFieldValue(&#39;foo&#39;) } in email templates, but
since extractcustomfieldvalues does it&#39;s work in Commit and the templates
are evaulated in Prepare, even scrip ordering doesn&#39;t make this possible.</p>

<div>

<p class="MsoNormal"> </p>

</div>

<div>

<p class="MsoNormal">Thanks.</p>

</div>

<div>

<p class="MsoNormal"> </p>

</div>

<div>

<p class="MsoNormal">-Todd</p>

</div>

</div></div>

</div>

</div>


</blockquote></div><br>