# Combining ReplaceAll + Left Pad transforms

**URL:** <https://developer.sailpoint.com/discuss/t/combining-replaceall-left-pad-transforms/87490>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, identity-security-cloud\
**Created:** [October 31, 2024, 1:23pm UTC](https://developer.sailpoint.com/discuss/t/combining-replaceall-left-pad-transforms/87490 "2024-10-31T13:23:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blazelip](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/blazelip/32/17177_2.png) [@Blazelip](https://developer.sailpoint.com/discuss/u/Blazelip)\
**Post date:** [October 31, 2024, 1:23pm UTC](https://developer.sailpoint.com/discuss/t/combining-replaceall-left-pad-transforms/87490/1 "2024-10-31T13:23:04Z")

</div>

Hello Colleagues,

I’m looking for help with building of the combined transform.

So the initial input from the Account Attribute is **00002121UK**

The first action shall remove UK from the value, so I expect **00002121**  
Then I need to normalize the 00002121 to 10 digits value to add 2 “0” in the beginning to get **0000002121**.

For these purposes I’m trying to combine “ReplaceAll” with “Left Pad”.  
Here is the code snippet.

```auto
{
  "attributes": {
    "padding": "0",
    "length": "10",
  },
  "type": "leftPad",
  "name": "Left Pad Transform",
  "input": {
    "type": "replaceAll",
    "attributes": {
      "table": {
        "[a-zA-z]": ""
      }
    },
  }
}

```

Probably because of the syntax issue but after Transform upload to Sailpoint tenant I’m getting the only part of it.

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/4/e/4e00e60f43b2d0a3693c26e9fb564baa34d0f990.png)

Can u assist me with this?  
Thank you

---

<div class="post-metadata">

**Author:** ![sup3rmark](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sup3rmark/32/36229_2.png) [@sup3rmark](https://developer.sailpoint.com/discuss/u/sup3rmark)\
**Post date:** [October 31, 2024, 1:33pm UTC](https://developer.sailpoint.com/discuss/t/combining-replaceall-left-pad-transforms/87490/2 "2024-10-31T13:33:43Z")

</div>

Hey there! The `input` section should be inside the `attributes` section.

Give this a try:

```json
{
    "attributes": {
        "padding": "0",
        "length": "10",
        "input": {
            "type": "replaceAll",
            "attributes": {
                "table": {
                    "[a-zA-z]": ""
                }
            }
        },
    }
    "type": "leftPad",
    "name": "Left Pad Transform"
}

```

---

<div class="post-metadata">

**Author:** ![Blazelip](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/blazelip/32/17177_2.png) [@Blazelip](https://developer.sailpoint.com/discuss/u/Blazelip)\
**Post date:** [October 31, 2024, 2:35pm UTC](https://developer.sailpoint.com/discuss/t/combining-replaceall-left-pad-transforms/87490/3 "2024-10-31T14:35:38Z")

</div>

There is a small typo in the code snippet u provided, type-name properties should be outside of attributes. But u are right regarding the `input`, that worked out.

---

<div class="post-metadata">

**Author:** ![sup3rmark](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sup3rmark/32/36229_2.png) [@sup3rmark](https://developer.sailpoint.com/discuss/u/sup3rmark)\
**Post date:** [October 31, 2024, 4:41pm UTC](https://developer.sailpoint.com/discuss/t/combining-replaceall-left-pad-transforms/87490/4 "2024-10-31T16:41:29Z")

</div>

you’re right, thanks! i’ve updated my comment to reflect that 🙂

---

<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:** [December 30, 2024, 4:41pm UTC](https://developer.sailpoint.com/discuss/t/combining-replaceall-left-pad-transforms/87490/5 "2024-12-30T16:41:38Z")

</div>

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