<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Kenny,<br>
<br>
I haven't looked at RT 4.4 yet, so perhaps it's built in there, but
it wasn't in RT 4.2.<br>
<br>
What you will need to do, if it isn't there already, is create your
own extension to the Asset.pm module, call it Asset_Local.pm, 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.<br>
<br>
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".<br>
<br>
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.<br>
<br>
Cheers,<br>
Kyle<br>
<br>
<div class="moz-cite-prefix">On 03/11/2016 11:38 AM, Seever, Kenny
wrote:<br>
</div>
<blockquote
cite="mid:6DD4000378C57D45A709CA0B1CB54C3419621B43@ATCPMX03.mwgp.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hello, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Kenny<o:p></o:p></p>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Kyle Dippery
Engineering Computing Services
219 RMB
859-257-1346
</pre>
</body>
</html>