Password Notification on startdate

I set up a transform to check if the start date is today. If yes, it marks an identity attribute to true that should trigger the workflow, but it’s not working always

.{

"id": "40427b26-e531-4dd9-a97d-42qwer9605b0",

"name": "CheckIfToday",

"type": "static",

"attributes": {

    "value": "#if($TodayorAfter == \\"true\\" && $TodayorBefore == \\"true\\")true#{else}false#end",

    "TodayorBefore": {

        "type": "dateCompare",

        "attributes": {

            "firstDate": {

                "type": "dateFormat",

                "attributes": {

                    "input": {

                        "type": "firstValid",

                        "attributes": {

                            "values": \[

                                {

                                    "type": "identityAttribute",

                                    "attributes": {

                                        "name": "startDate"

                                    }

                                },

                                "1900-01-01"

                            \]

                        }

                    },

                    "inputFormat": "yyyy-MM-dd",

                    "outputFormat": "ISO8601"

                }

            },

            "secondDate": {

                "type": "dateFormat",

                "attributes": {

                    "input": {

                        "type": "dateMath",

                        "attributes": {

                            "expression": "now-5h/d"

                        }

                    },

                    "inputFormat": "yyyy-MM-dd'T'HH:mm",

                    "outputFormat": "ISO8601"

                }

            },

            "operator": "lte",

            "positiveCondition": "true",

            "negativeCondition": "false"

        }

    },

    "TodayorAfter": {

        "type": "dateCompare",

        "attributes": {

            "firstDate": {

                "type": "dateFormat",

                "attributes": {

                    "input": {

                        "type": "firstValid",

                        "attributes": {

                            "values": \[

                                {

                                    "type": "identityAttribute",

                                    "attributes": {

                                        "name": "startDate"

                                    }

                                },

                                "1900-01-01"

                            \]

                        }

                    },

                    "inputFormat": "yyyy-MM-dd",

                    "outputFormat": "ISO8601"

                }

            },

            "secondDate": {

                "type": "dateFormat",

                "attributes": {

                    "input": {

                        "type": "dateMath",

                        "attributes": {

                            "expression": "now-5h/d"

                        }

                    },

                    "inputFormat": "yyyy-MM-dd'T'HH:mm",

                    "outputFormat": "ISO8601"

                }

            },

            "operator": "gte",

            "positiveCondition": "true",

            "negativeCondition": "false"

        }

    }

},

"internal": false

}

I am seeing few syntactic errors in the transform, not sure whether that is a typo and corrected it.

  {
    "id": "40427b26-e531-4dd9-a97d-42qwer9605b0",
    "name": "CheckIfToday",
    "type": "static",
    "attributes": {
        "value": "#if($TodayorAfter == 'true' && $TodayorBefore == 'true')true#{else}false#end",
        "TodayorBefore": {
            "type": "dateCompare",
            "attributes": {
                "firstDate": {
                    "type": "dateFormat",
                    "attributes": {
                        "input": {
                            "type": "firstValid",
                            "attributes": {
                                "values": [
                                    {
                                        "type": "identityAttribute",
                                        "attributes": {
                                            "name": "startDate"
                                        }
                                    },
                                    "1900-01-01"
                                ]
                            }
                        },
                        "inputFormat": "yyyy-MM-dd",
                        "outputFormat": "ISO8601"
                    }
                },
                "secondDate": {
                    "type": "dateFormat",
                    "attributes": {
                        "input": {
                            "type": "dateMath",
                            "attributes": {
                                "expression": "now-5h/d"
                            }
                        },
                        "inputFormat": "yyyy-MM-dd'T'HH:mm",
                        "outputFormat": "ISO8601"
                    }
                },
                "operator": "lte",
                "positiveCondition": "true",
                "negativeCondition": "false"
            }
        },
        "TodayorAfter": {
            "type": "dateCompare",
            "attributes": {
                "firstDate": {
                    "type": "dateFormat",
                    "attributes": {
                        "input": {
                            "type": "firstValid",
                            "attributes": {
                                "values": [
                                    {
                                        "type": "identityAttribute",
                                        "attributes": {
                                            "name": "startDate"
                                        }
                                    },
                                    "1900-01-01"
                                ]
                            }
                        },
                        "inputFormat": "yyyy-MM-dd",
                        "outputFormat": "ISO8601"
                    }
                },
                "secondDate": {
                    "type": "dateFormat",
                    "attributes": {
                        "input": {
                            "type": "dateMath",
                            "attributes": {
                                "expression": "now-5h/d"
                            }
                        },
                        "inputFormat": "yyyy-MM-dd'T'HH:mm",
                        "outputFormat": "ISO8601"
                    }
                },
                "operator": "gte",
                "positiveCondition": "true",
                "negativeCondition": "false"
            }
        }
    },
    "internal": false
}

Please check whether the identity attribute always updating the value for all the identities which is missing the Workflow trigger.

I can see the current date time is subtracted to 5 hours and round of with a day in the transform. So you need to take this also into account during the identity refresh and test it against the time.

Sure, Thanks…will try the above.