Need help in creating logic/transform by appending letter at the prefix of a numbers

Hi @Apoorv0802,

Here is a sample velocity template that could fit for you :

{
    "id": "350b61cf-acca-4f1c-a3d7-d186b6b7e556",
    "name": "UID_prefix",
    "type": "static",
    "attributes": {
        "ID": {
            "attributes": {
                "attributeName": "File_Number",
                "sourceName": "Employees"
            },
            "type": "accountAttribute"
        },
        "value": "#if($ID.length() == 6)U$ID#{elseif}($ID.length() == 7 && $ID.startsWith(\"10\"))UA$ID.substring(2,$ID.length())#{elseif}($ID.length() == 7 && $ID.startsWith(\"11\"))UB$ID.substring(2,$ID.length())#{else}$ID#end"
    },
    "internal": false
}
3 Likes