# Create profile display name getting space

**URL:** <https://developer.sailpoint.com/discuss/t/create-profile-display-name-getting-space/75193>\
**Category:** SHF Discussion and Questions\
**Tags:** identity-security-cloud, provisioning\
**Created:** [August 2, 2024, 2:44am UTC](https://developer.sailpoint.com/discuss/t/create-profile-display-name-getting-space/75193 "2024-08-02T02:44:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gayare](https://avatars.discourse-cdn.com/v4/letter/g/51bf81/32.png) [@gayare](https://developer.sailpoint.com/discuss/u/gayare)\
**Post date:** [August 2, 2024, 2:44am UTC](https://developer.sailpoint.com/discuss/t/create-profile-display-name-getting-space/75193/1 "2024-08-02T02:44:02Z")

</div>

I have below mapped displayName in create profile and there are few employee type don’t have $ccad. when there no $ccad I am getting space at the end of display name.

Any idea how to remove that space when there is no $ccad.

```auto
<AttributeRequest name="displayName" op="Add" value="SPTest, SkeTestd "/>

```

```auto
{
            "name": "displayName",
            "transform": {
                "type": "rule",
                "attributes": {
                    "name": "Create Unique LDAP Attribute"
                }
            },
            "attributes": {
                "template": "$(lastname), $(firstname)$(uniqueCounter) $(ccad)"
            },
            "isRequired": false,
            "type": "string",
            "isMultiValued": false
        }

```

---

<div class="post-metadata">

**Author:** ![nikhlesh21](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/nikhlesh21/32/11800_2.png) [@nikhlesh21](https://developer.sailpoint.com/discuss/u/nikhlesh21)\
**Post date:** [August 2, 2024, 5:58am UTC](https://developer.sailpoint.com/discuss/t/create-profile-display-name-getting-space/75193/2 "2024-08-02T05:58:48Z")

</div>

HI @gayare,

You can add Trim operation in transform to remove any extra spaces.

Thanks.

---

<div class="post-metadata">

**Author:** ![kdfreeman](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kdfreeman/32/22737_2.png) [@kdfreeman](https://developer.sailpoint.com/discuss/u/kdfreeman)\
**Post date:** [August 2, 2024, 6:06am UTC](https://developer.sailpoint.com/discuss/t/create-profile-display-name-getting-space/75193/3 "2024-08-02T06:06:17Z")

</div>

You can use Replace or ReplaceAll transform and replace space with empty string “”.  
Here is the reference if you are using Replace.[Replace | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/transforms/operations/replace)

---

<div class="post-metadata">

**Author:** ![iamnithesh](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamnithesh/32/42445_2.png) [@iamnithesh](https://developer.sailpoint.com/discuss/u/iamnithesh)\
**Post date:** [August 2, 2024, 10:48pm UTC](https://developer.sailpoint.com/discuss/t/create-profile-display-name-getting-space/75193/4 "2024-08-02T22:48:13Z")

</div>

As you are using a Generator in create profile, I don’t think you will be able to wrap it with any transform. Only thing I can think of is to have another Identity attribute (say named ccad1) and apply a transform to it which will have " valueOf\_ccad" when ccad has a value, and an empty string when ccad is empty. Then use the ccad1 attribute in the template for Generator rule

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [October 1, 2024, 10:48pm UTC](https://developer.sailpoint.com/discuss/t/create-profile-display-name-getting-space/75193/5 "2024-10-01T22:48:23Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
