Pipe delimited content failing to be retrieved in a transform

Error: {attributes={values=[com.sailpoint.mantis.core.transform.AccountAttributeTransform@2d36608]}}

Aggregation looks to have the data on the account. The field name from the source is storing the data on the account in ISC / IDN: (Data modified for privacy - but the structure consistent)

Attribute data value: cddpo|St Joseph|Stp|10th Floor|Civel University|Student|Jan 21 2023 12:00AM|01/21/2023|May 25 2023 12:00AM|05/25/2023|LPN|||

The transform contains the following:

"mvRotation": {
            "attributes": {
                "values": [
                    {
                        "type": "accountAttribute",
                        "attributes": {
                            "sourceName": "App-Dev",
                            "attributeName": "mv_Info"
                        }
                    }
                ]
            }
        },
        
        "value": "$mvRotation"

When I’m done with the transform, I will be splitting the pipe delimited values so that I can grab the piece I want to. But I can’t get that far to work with the data as we get the above message when just trying to print out the content of the variable.

The source system is a JDBC source. The field in the view we are aggregating looks the same as what the account attribute shows within ISC. I think the issue is being able to read it from ISC.

Pipe “|” is a special character in Velocity which is causing the error. Here is a transform that returns a string @ index 0

{
    "name": "AATest_PipeCharacterInVelocity",
    "type": "static",
    "attributes": {
        "value": "$pipeString.split('\\|')[0]",
        "pipeString": "cddpo|St Joseph|Stp"
    },
    "internal": false
}

image

1 Like

I can get your example to work, but having a difficult time getting to work with pulling it from an accountAttribute type.

{
    "id": "95271586-570d-4b43-9a3a-717eec3af4e4",
    "name": "test",
    "type": "static",
    "attributes": {
        "requiresPeriodicRefresh": "true",
        "mvRotation": {
            "attributes": {
                "values": [
                    {
                        "type": "accountAttribute",
                        "attributes": {
                            "sourceName": "App-Dev",
                            "attributeName": "mv_Info"
                        }
                    }
                ]
            }
        },
        "value": "$mvRotation.split('\\|')[1]"
    },
    "internal": false
}

This errors as it doesn’t like the escaping of the pipe possibly because there isn’t a pipe as $mvRotation seems to contain the original message from the first post as the value. If I use "$mvRotation.split('|)[1] it outputs the letter a, as the value stored in mvRotation is {attributes={values=[com.sailpoint.mantis.core.transform.AccountA…

It seems like you have missed to mention the type inside this transform you are assigning to mvRotation

thank you!! I think I just demoted myself back to a novice :slight_smile:

thank you for the extra pair of eyes!!

1 Like

Good to know it worked.

Just a suggestion that the post that had the correct answer to your original question be marked as solution. That will help future users

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