We have a couple of processes that calculate mileage using the Federal rate. Previously the rate had been hard-coded as a default value. We were alerted a few weeks ago that the rate would change for travel on or after 7/1/2022. At that time I removed the hard-coded value and created a simple formula for that would apply the proper rate depending on a return date (=IF(Return_Date_1<"7/1/2022",0.585,0.625)) and added it to all review tasks, but then I realized that the formula was not applying to requests already in progress (which has already used the hard-coded value) for travel after 7/1/2022. Is there a way to get the formula to recalculate/retrigger when review tasks are opened?
Question
Question
Answer
SELECTED ANSWER
replied on July 1, 2022
•
Show version history
Formulas and lookups do not not update if they were populated from a prior task step. The way to get them to update again is to change the fields that feed into them. Since your formula is referencing the Return_Date_1 field, a change to that field should trigger the formula to run again.
So you could instruct your reviewing team to edit that field.
If you'd rather do it automatically, and you are using the classic designer, you should be able to do it via Javascript. Assuming your Return_Date_1 field has a CSS Class Name of returnDate, Javascript like this will probably work (it just triggers the change event when the form loads:
$(document).ready(function() { //Trigger the change event of the returnDate field upon form load. //This helps ensure formulas are updated. $('.returnDate input').trigger('change'); });
0
0