How to force a recalculation?

@Malcolm Evaluate is field specific; using the LET statement is a just a completely independent field update, that, when it occurs, whatever the rest of the calculation does, executes.

15+ years ago, I use a 1/0 binary state field, but that required checking the content and "flipping the bit" to trigger a recalc; the advantage of using a timestamp field was the timestamp is always different, so the calc is guaranteed to be executed (could have used a UUID but less informative). RCC (Nick) was the impetus to swap over from the binary to timestamp, but the method is the same.

by all at once you mean your script does a replace field content? Like the command under the Records tab "Replace field content", but by script?

OK for users manual changes

side note: in your status calc, here is a nice trick someone showed me;

Case(
	
 Position ( "Closed|Complete|Cancelled" ; Status ; 1 ; 1 ) > 0   ;
 "final";
	
 "temporary"
	
)
2 Likes

I avoid RFC (lots in another thread on this) because of a myriad of issues around record locking and error trapping. Loop and set fields, but yes, the entire table(s) gets updated in the very early AM. There is also a obscure button on layouts for doing this "manually" with a PSoS - primarily a developer tool to deal with changes that are outside user normal operation, but require an update.

At one time, I updated a TODAY field used in calcs, but found the LET based trigger calc to be far more modular and flexible, allowing things other than date based unstored calcs to become [auto-enter] "stored" calcs

1 Like