Quantcast
Channel: Ivanti User Community: Message List
Viewing all articles
Browse latest Browse all 12704

Re: Calculation that searches all values in an attribute

$
0
0

If Im understanding you correctly, and you just want to make sure the Suggested Username is not taken....here's something that will search your Service Desk environment to see if a particular instance of an object exists.  (my username format was first letter of given name + last name.

 

 

import System

 

static def GetAttributeValue(Activity):

 

Value = 'found nothing for = ' + Activity._EmployeeFirstName.Substring(0,1)+ Activity._EmployeeLastName

 

user = Activity.GetObjectByAttribute("System.User","Name", Activity._EmployeeFirstName.Substring(0,1)+ Activity._EmployeeLastName)

 

if user != null:

 

Value = 'found =' + user.Title

 

return Value

 


Viewing all articles
Browse latest Browse all 12704

Trending Articles