First While creating your staff object, maintain joining date.
While creating a form check daysBetween($joiningDate,[%CurrentDateTime%]) , if it is greater than 365, you can allow them to create a form.
Also there is function yearsBetweeen.
Hope this helps!
Hi Muhammad Ikhwan Afiq bin Azmir
You can Create a Validation microflow.
Compare the days between the current date and the join date, it will return a number of days. put a condition who can edit the form based on the number of days greater than 365
Hi Muhammad Ikhwan Afiq bin Azmir,
You can always use DateTime function in Mendix. you can use days between functions. You can decide on how to handle it. You can keep two date Time Attributes one for Onboarding date and another expiry date( Can calculate this while Commiting the object . Make use of AddDays/AddMonths/Addyears Function and Save it. Now based on the Expiry date you can handle your Button visibility etc..
Hope this helps!!