I’m calculating elapsed days with the formula ($now – date_field) / 86400
It works fine the first time, but since it won’t automatically recalculate I edit the field by changing the constant to 86401. Sometimes it works, although it’s slow with approximately 1,000 records, but recently it won’t recalculate at all. It hogs cpu and will spend hours “recalculating.” Multiple times I’ve had to force quit the app, delete the field, and create a new one with the same parameters.I obviously don’t know the inner workings, but it seems that 1,000 calculations should take half a second.
Update: I ran the four maintenance routines and now it works fine. It recalculates in about fifteen seconds.
Hi Philip,
Whenever you view a record with a $now calculation in it, it should trigger a re-calculation. But I guess that’s not useful if you’re viewing the list of records displaying the results of a calculation there.
Thanks,
Brendan
I’m still having fits with the recalculate. Maintenance routines sometimes help, and sometimes it still takes very long times (20 – 30 minutes) to do the calculation noted above. I’ve never seen the recalculate take place because of viewing a record.
Hi Philip,
I’ll have to look more closely at my code to see if there are any optimizations I can make. I know you’re not doing this in your formula, but if you reference a calculation field within the formula of another calculation field, then Tap Forms must calculate all the calculation fields within the formula first before it’s able to complete the overall formula. So it can slow it down even more.
Thanks,
Brendan