Velocity transform error: Error rendering template

Any ideas on why the below transform is erroring out? To my knowledge the syntax is correct. I tried doing a set with the domain name value and adding it on the end in case the ‘@’ sign was causing an issue.

{
    "name": "SB-SetEmail-WD",
    "type": "static",
    "attributes": {
        "wdEmail": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "attributeName": "EMAIL_ADDRESS_WORK",
                            "sourceName": "WD Connector"
                        },
                        "type": "accountAttribute"
                    },
                    {
                        "attributes": {
                            "value": "NOEMAIL"
                        },
                        "type": "static"
                    }
                ]
            },
            "type": "firstValid"
        },
        "sAMAccountName": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "attributeName": "sAMAccountName"
                        },
                        "type": "identityAttribute"
                    },
                    {
                        "attributes": {
                            "value": "empty"
                        },
                        "type": "static"
                    }
                ]
            },
            "type": "firstValid",
            "ignoreErrors": "true"
        },
        "value": "#if($wdEmail != 'NOEMAIL')$(wdEmail)#elseif($wdEmail == 'NOEMAIL' && $sAMAccountName != 'empty')$(sAMAccountName)@company.net#{else}#end"
    },
    "internal": false
}

I was able to resolve this. I believe the solution was due to my variable case was incorrect.

vscode spoils me too often :slight_smile:

1 Like

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