Last active
November 16, 2020 11:31
-
-
Save CubeYogi/7ca8b46f7e74e49c393935dc6a11cfd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Getting employee form entries | |
//Replace your form and field link name if needed | |
for each employee in Employee[dateofhire != null] | |
{ | |
//Calculating Years of Service | |
from_year = employee.dateofhire.getYear(); | |
to_year = zoho.currenttime.getYear(); | |
service_year = to_year - from_year; | |
//Updating Years of Service | |
employee.yearsofservice = service_year; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment