Transform that has $ sign in its output? Can't seem to escape $ sign

I need to generate an identity attribute value using a transform that needs to have a dollarsign $ in it

I can’t figure out how to escape the $ sign.. \ (double backslash isn’t it).

can anyone provide an example of how to generate a string (using a concat transform) that outputs a value that has a $ sign in it?

Try below Transform:

{
    "name": "Example Concat",
    "type": "concat",
    "attributes": {
        "values": [
            {
                "type": "static",
                "attributes": {
                    "value": "Hello"
                }
            },
            " World!"
        ]
    },
    "internal": false
}

Your example doesn’t have a $ sign in it?

To continue with your example, I need the output to have $world in it.

(where $world is not a parameter, its just a string I need in the output.)

Hey @ccarlton

Apache Velocity which is the underlying helper to transforms has a “escape everything in this block and return it as it’s normal value”

That block is

#[[]]#

In order to use it in a static string or a concat transform you can use it like so:

{
    "name": "Example Concat",
    "type": "concat",
    "attributes": {
        "values": [
            "#[[$]]#",
            "World!"
        ]
    },
    "internal": false
}

This will render $World!

5 Likes

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