Modified custom field in scrip I can not show in template

I have successfully changed value of my custom field on ticket creation via Scrip using this solution
so now in Custom Fields section of Ticket metadata in RT i can see that value has changed, in History section I see The RT System itself - custom field (value1) changed to value2
Problem is I can not see changed value instead of old value in template execution where I use following to write custom field value in mail response {$Ticket->FirstCustomFieldValue(‘My custom field4:’)}, this simply writes value I enter during ticket creation or nothing if nothing is entered in My custom field4 .

RT 4.0.7

Any help is greatly appreciated

thank you in advance,

Hello Nikola,

am I getting you right, you want to shown the new value in your mail response?

In my opinion changing the value of an custom field is a transaction (of the type ‘set’ ).
So {$Transaction->NewValue} should work in your template.


This template you mention - would this be the AutoReply template? If that is the case, maybe the autoreply is generated and sent before the custom field is modified?


@Lars That’s exactly what I thought, yes template is of Autoreply sort, I was expecting to catch it in template/mail via $Ticket->FirstCustomFieldValue(‘Modified CF:’) but that didn’t work, solution was
to put {$Transaction->CreatorObj->Organization} in template to catch user organization
@Patrick you were close but if wanted value that wasn’t something already filled in users profiles but lets say some computed value I still don’t know how would I pass that value to mail via template, so I guess both answers are close to truth…
anyway thank you for replies