0 votes

Hi there,

we are using a property pattern to create the DisplayName which consists of %firstname% %middleName% %lastname%
In a way this is working as long as Middlename is used but if its empty there are two spaces in the DisplayName.
Is there any chance to get rid of this?


kind regards
Ingemar

by (960 points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello Ingemar,

Yes, there is. You can configure a Business Rule triggered before creating a user that will trim the extra spaces. For information on how to create such a rule, see the following tutorial: http://www.adaxes.com/tutorials_Simplif ... Script.htm.

On Step 5 of the tutorial, use the following PowerShell script:

# Get the Display Name
$displayName = $Context.GetModifiedPropertyValue("displayName")

# Trim extra spaces
$displayName = $displayName.Trim()

# Save changes
$Context.SetModifiedPropertyValue("displayName", $displayName)
0

Thank you very much, that worked perfectly!

Related questions

0 votes
1 answer

Hi i have created a business role in that role if user is created a specific OU it will do everyting , generate password create email in specific DataBase , but i cannot find how to ... BA , according to this ou user should get @ba.com UPN , how can i do that?

asked Nov 29 by vagifazari (450 points)
0 votes
1 answer

Hi , I would like to know that is there any API service, where we can work on objects inside Adaxes tool? Preferbly REST API?

asked Nov 6, 2019 by Anil (20 points)
0 votes
1 answer

Hi, I am currently working on an interface that allows our HR tool to create users in Adaxes. I got the whole thing to work up to that point where I want user creation to be ... it obviously won't find the user as it has not yet been created at that point...

asked Dec 10, 2018 by Yannik (100 points)
0 votes
1 answer

need help on changing display name of a customattribute (customattributedate1)

asked Jan 4, 2021 by snawaz (20 points)
0 votes
1 answer

In the web interface, I would like to display the "Distinguished Name" property but it is not showing it as it would when using ADUC or even in the Adaxes Admin Console. Is ... I would like it to display like this: CN=Mark Smith,OU=Sales,DC=Fabrikam,DC=COM

asked Jan 15, 2020 by mark.it.admin (2.3k points)
3,572 questions
3,261 answers
8,277 comments
547,995 users