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 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

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

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)
0 votes
1 answer

Is it possible for the email notification action to display a friendly name instead of email address from Softerra Adaxes Service? I'm using the built-in send email action. Would using a powershell method change this behavior?

asked Aug 15, 2019 by polley (1.2k points)
3,539 questions
3,230 answers
8,225 comments
547,760 users