Hi All
I've gone a bit wild and tried to create a calculation that will check, as part of a condition, whether a username already exists in the database (user.name field in the user table)
This should hopefully redirect the request to a "create this user manually area" of the process. I'm struggling to find out how to search through all of the values stored in the user.name field. This is what I have so far:
import System
static def GetAttributeValue(Request):
SuggestedUN = Request._NewUserSurname +'.'+ Request._NewUserFirstName
if Request.RaiseUser.Name == SuggestedUN:
value = 'Not Available'
The syntax checks ok but there is an object reference error in line
I then went the whole hog and failed again
import System
static def GetAttributeValue(Request):
value = Request.RaiseUser.Title
SuggestedUN = Request._NewUserSurname +'.'+ Request._NewUserFirstName
if Request.RaiseUser.Name != null and Request.RaiseUser.Name == SuggestedUN:
value = 'Available'
else:
value = 'Not Available'
return value.ToString()
I'm pretty sure that the calculation is not going to do what i need it to do anyway as it's only matching against the name for that request rather than the whole table of user.names
Help appreciated as always
Jason