Multiple transforms can be applied to one field?

Hi Team,

I’ve already applied some the transforms to fields like fullName(firstName.lastName transform), lastName(), email(validate email transform) etc.

Now, I want to set empty values to this fields firstName, lastName, email if PROV-EMP(temporary employees) user(s) are set to terminate today. I wrote a transform like below.

{
    "attributes": {
        "EMAIL": {
            "attributes": {
                "attributeName": "EMAIL",
                "sourceName": "Oracle ERP"
            },
            "type": "accountAttribute"
        },
        "WORKER_TYPE": {
            "attributes": {
                "attributeName": "WORKER_TYPE",
                "sourceName": "Oracle ERP"
            },
            "type": "accountAttribute"
        },
        "MATCH_DATE": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "values": [
                            {
                                "attributes": {
                                    "input": {
                                        "attributes": {
                                            "sourceName": "Oracle ERP",
                                            "attributeName": "LATEST_HIREDT"
                                        },
                                        "type": "accountAttribute"
                                    },
                                    "inputFormat": "ddMMyyyy",
                                    "outputFormat": "PEOPLE_SOFT"
                                },
                                "type": "dateFormat"
                            },
                            {
                                "attributes": {
                                    "input": "31121999",
                                    "inputFormat": "ddMMyyyy",
                                    "outputFormat": "PEOPLE_SOFT"
                                },
                                "type": "dateFormat"
                            }
                        ]
                    },
                    "type": "firstValid"
                },
                "secondDate": {
                    "attributes": {
                        "input": {
                            "attributes": {
                                "expression": "now",
                                "roundUp": true
                            },
                            "type": "dateMath"
                        },
                        "inputFormat": "ddMMyyyy",
                        "outputFormat": "PEOPLE_SOFT"
                    },
                    "type": "dateFormat"
                },
                "expression": "$firstDate eq $secondDate",
                "positiveCondition": "Matched",
                "negativeCondition": "Not Matched"
            },
            "type": "conditional"
        },
        "value": "#if($WORKER_TYPE.equalsIgnoreCase('EMP-PROV') && $MATCH_DATE.equalsIgnoreCase('Matched'))#else$EMAIL#end"
    },
    "type": "static",
    "id": "Flush data on term date"
}

Since, I already used some transforms how can I set empty values to such large set of fields? firstName, lastName, email, empNo etc? Any thoughts?

Your example is using explicit input because you are declaring the account attribute you want to use.

"EMAIL": {
            "attributes": {
                "attributeName": "EMAIL",
                "sourceName": "Oracle ERP"
            },
            "type": "accountAttribute"
        },

If you wanted to use this approach to set empty values for other fields, like firstName, lastName, etc, you would need to create a transform for each and explicitly define the attribute.

If you want to only have one transform that can set empty values for the configured attribute in the UI, you need implicit input. You can read more about implicit vs explicit here. To get the implicit attribute configured via the UI, you need to create an attribute in your static transform that uses an operation that can easily work on implicit input, like trim. Other operations will work to, but trim should have the least impact on the attributes you are working with. So you could try the following:

{
    "attributes": {
        "IMPLICIT_ATTRIBUTE": {
            "type": "trim"
        },
        "WORKER_TYPE": {
            "attributes": {
                "attributeName": "WORKER_TYPE",
                "sourceName": "Oracle ERP"
            },
            "type": "accountAttribute"
        },
        "MATCH_DATE": {
            "attributes": {
                "firstDate": {
                    "attributes": {
                        "values": [
                            {
                                "attributes": {
                                    "input": {
                                        "attributes": {
                                            "sourceName": "Oracle ERP",
                                            "attributeName": "LATEST_HIREDT"
                                        },
                                        "type": "accountAttribute"
                                    },
                                    "inputFormat": "ddMMyyyy",
                                    "outputFormat": "PEOPLE_SOFT"
                                },
                                "type": "dateFormat"
                            },
                            {
                                "attributes": {
                                    "input": "31121999",
                                    "inputFormat": "ddMMyyyy",
                                    "outputFormat": "PEOPLE_SOFT"
                                },
                                "type": "dateFormat"
                            }
                        ]
                    },
                    "type": "firstValid"
                },
                "secondDate": {
                    "attributes": {
                        "input": {
                            "attributes": {
                                "expression": "now",
                                "roundUp": true
                            },
                            "type": "dateMath"
                        },
                        "inputFormat": "ddMMyyyy",
                        "outputFormat": "PEOPLE_SOFT"
                    },
                    "type": "dateFormat"
                },
                "expression": "$firstDate eq $secondDate",
                "positiveCondition": "Matched",
                "negativeCondition": "Not Matched"
            },
            "type": "conditional"
        },
        "value": "#if($WORKER_TYPE.equalsIgnoreCase('EMP-PROV') && $MATCH_DATE.equalsIgnoreCase('Matched'))#else$IMPLICIT_ATTRIBUTE#end"
    },
    "type": "static",
    "id": "Flush data on term date"
}