Transform assistance - firstValid, nulls, or a new direction

I’ve got a complicated order.

First, we use a database source for authoritative identities. It’s working great.

Occasionally, terminations are uncomfortably sudden and HR records don’t get updated in time. To handle that, we use an AD attribute as a “Second witness” to terminations.

Recently, audit asked that we include a date from Workday in our termination calculation, raising the complexity level quite a bit.

I was hoping to use firstValid, but it seems that the dateCompare option lacks the ability to return a null value. I’ve tried:

“positiveCondition”: null,

“positiveCondition”: “null”,

“positiveCondition”: “”,

The rest of the transform seems to work correctly.

Is there a way to return a null so the firstValid transform will proceed to the next calculation or do i need to use some other type of more fundamental logic? Current transform here, with null in the area that is not working.

{
    "name": "New Lifecycle State",
    "type": "firstValid",
    "attributes": {
        "values": [
            {
                "attributes": {
                    "firstDate": {
                        "attributes": {
                            "input": {
                                "attributes": {
                                    "sourceName": "Some Workday Source",
                                    "attributeName": "DATE_LAST_EMPLOYED"
                                },
                                "type": "accountAttribute"
                            },
                            "inputFormat": "MM/dd/yyyy",
                            "outputFormat": "ISO8601"
                        },
                        "type": "dateFormat"
                    },
                    "secondDate": "now",
                    "operator": "gt",
                    **"positiveCondition": null,**
                    "negativeCondition": "inactive",
                    "requiresPeriodicRefresh": "true"
                },
                "type": "dateCompare"
            },
            {
                "type": "lookup",
                "attributes": {
                    "input": {
                        "attributes": {
                            "attributeName": "termStatus",
                            "sourceName": "Active Directory Info"
                        },
                        "type": "accountAttribute"
                    },
                    "table": {
                        "default": {
                            "attributes": {
                                "table": {
                                    "default": "active",
                                    "T": "inactive",
                                    "I": "active"
                                }
                            },
                            "type": "lookup"
                        },
                        "termedWithinAD": "inactive"
                    }
                }
            }
        ],
        "ignoreErrors": false
    },
    "internal": false
}

Shoot! Nevermind. The error was in another portion of the transform. It appears that “” is an adequate representation of null.

1 Like