I haven't looked at RT 4.4 yet, so perhaps it's built in there, but it wasn't in RT 4.2.

What you will need to do, if it isn't there already, is create your own extension to the module, call it, and add code there to check for uniqueness and auto-populate the field. The Create {} subroutine is the one you'll most likely want to override.

One gotcha that I remember (I did this about a year ago) is that I needed to know the number of the custom field; I couldn't figure out how to search the $args{} array for the field by name. That being our most critical custom field, though, it made sense to create it first so it would be "CustomField-1".

I'm reluctant to post my actual code, because it's crappy and I don't want to release bad code into the wild, but if you'd like to see it I can sanitize it some and share it.


On 03/11/2016 11:38 AM, Seever, Kenny wrote:


I am working on evaluating using the Assets module in RT to manage our equipment, but haven’t been able to figure out if there is a way to make a field unique. All of our equipment has a 5 digit asset number (2XXXX) that is unique. I need to be able to add a field that makes sure that each number is only used once. Ideally it would auto populate with the next number when a new asset is added, but that may be asking for too much. Is there build in functionality for any of this that I’ve missed in the documentation?

Thanks in advance,


Kyle Dippery
Engineering Computing Services
219 RMB

RT 4.4 and RTIR Training Sessions
* Washington DC - May 23 & 24, 2016

Reply via email to