For several weeks we had a BIG issue with the web client.
If you have some calculations used as dataproviders on some forms and if in those calculations you use a relation that is based on a global, and if you set that global in the calculation things WILL go wrong. Not always BUT sometimes they will go wrong: that form will not load.
What happens is that the calculation depends on the global.
When the same calc runs on another record the global is changed and the first calc is flagged for recalculation.
When it runs for the next record, the global is changed again and both 2 previous calcs are flagged.
Etc.
Basically you need relation with arguments in stead of the using the global, this was also discussed here: viewtopic.php?t=15513
Has anyone already created a feature request already?
In your case you can solve this by using a relation on the duty_date field in stead of the global.
setting any other variable in a calculation is just not allowed.
That’s a big nogo.
Calculations are just for getting one piece of value, their own. They must not set anything else.
Also calculations are even executed at the same time if for example you show it in a tableview… What happens then if you are constantly setting a global?
So they are not executed in sequel but in parallel so one calc can see the global value of another calc…