Transform is not working

Hi All,

I have two attribute,

isStaffType : if user is part of either source A or source B, return “Y” else return “N”
isStudentType: if user is part of source C, return “Y” else return “N”

when I add select the transform , I select source A in case of isStudentType even under source A identity Profile but it is not working.

Same this happens when I select source as Source A for isStaffType attribute, this doesn’t work when user has only source C.

"name": " Select isStudentType",
"type": "static",
"attributes": {
    "isStudentType": {
        "attributes": {
            "values": [
                {
                "attributes": {
                    "attributeName": "ABC",
                    "sourceName": "source C"
                },
                "type": "accountAttribute"
            },
            {
                "attributes": {
                    "value": ""
                },
                "type": "static"
            }   
            ]
        },
        "type": "firstValid"
    },
     "value": "#if($isStudentType=='')N#{else}Y#end"
},
"internal": false

}

=========

{
“name”: " Select isStaffType",
“type”: “static”,
“attributes”: {
“isStaffType”: {
“attributes”: {
“values”: [
{
“attributes”: {
“attributeName”: “attrbutename”,
“sourceName”: “Source A”
},
“type”: “accountAttribute”
},
{
“attributes”: {
“attributeName”: “attrbutename”,
“sourceName”: “source B”
},
“type”: “accountAttribute”
},
{
“attributes”: {
“value”: “”
},
“type”: “static”
}
]
},
“type”: “firstValid”
},
“value”: “#if($isStaffType==‘’)N#{else}Y#end”
},
“internal”: false
}

Hi @vijay_sharma, here are some transforms that will work for you. I think you may want to define a “null” string value rather than an empty string, as that will adversely affect any logical statements.

Staff Type

{
    "name": "Select_StaffType",
    "type": "static",
    "attributes": {
        "staffType": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "attributeName": "ABC",
                            "sourceName": "Source A"
                        },
                        "type": "accountAttribute"
                    },
                    {
                        "attributes": {
                            "attributeName": "ABC",
                            "sourceName": "Source B"
                        },
                        "type": "accountAttribute"
                    },
                    "null"
                ]
            },
            "type": "firstValid"
        },
        "value": "#if($staffType!='null')Y#{else}N#end"
    }
}

Student Type

{
    "name": "Select_StudentType",
    "type": "static",
    "attributes": {
        "studentType": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "attributeName": "ABC",
                            "sourceName": "Source C"
                        },
                        "type": "accountAttribute"
                    },
                    "null"
                ]
            },
            "type": "firstValid"
        },
        "value": "#if($studentType!='null')Y#{else}N#end"
    }
}

Please let me know if this helps :slight_smile:

1 Like

Thanks so much @brennenscott this worked ! thank you so much for your help.

1 Like