Field need to be required for new record created from mention date

I have created a new field in one of the module and that field needs to be required for created after any set date (i.e. 2020-10-20), that should not be required for old records. I am using the below formula to achieve this but somehow the formula is not working. Please suggest any solution.

or(not(greaterThan(strlen(toString($date_created)),0)),isAfter($date_created,date("2020-10-20")))
Parents Reply
  • The field that you need to use for "Created Date" is $date_entered and not date_created.

    So for new records (create view), you can use equal($id, ""), as Andre suggested.

    For existing records (record view), you can use isAfter($date_entered,date("2020-10-20"))

    So, the final criteria that you need to use is a slightly modified version of Andre's solution:

    or(equal($id,""), isAfter($date_entered,date("2020-10-20")))
Children