Could you please suggest the best way to calculate field values efficiently?
Below is my example.
I have got 2 modules:
-
Module ‘Employee’ - field:
a. HourlyRate(number input) -
Module ‘Timesheet’ – fields:
a. WorkedHours (number input),
b. WorkedHoursValue → which should be calculated: Employee.HourlyRate * Timesheet.WorkedHours
I have prepared a workflow to calculate this value, but I have a problem with saving it – action is triggered 10 times instead of 1.
The workflow is triggered by actions in the ‘Timesheet’ module: either after creation or after an update. At the end I use ‘Compose record update’ function to save ‘Timesheet’ record with new value. And this function triggers the action/ workflow again. In the result record gets updated 10 times. I’ve noticed this in the revision numbers.
Is there a way I can solve this issue or maybe I did something wrong in here?