Recalculating all fields "on command"


#1

Panorama normally performs automatic calculations when you enter data. However, I had a user send in an email requesting the ability to perform automatic calculations on command, even if data was not entered. For example, the value of a lookup( formula might change even if no data had been entered in the current record (because of changes made in the database being looked up into).

I was able to come up with a one line program that will automatically run all of the automatic calculations for the current record.

execute arrayfilter(dbinfo("fields",""),cr(),|||sandwich(chevronquoted(import())+"=",fieldformula("",import()),"")|||)

Notice that this doesn’t run any automatic code that has been set up, only automatic formulas.

I’m not sure if adding a menu command for this would be a useful feature, or just added clutter for most users. I imagine different users on here would have different opinions about that. In the mean time, if you need this feature, just use this one line program.

If you are curious about how this program works, replace the execute statement with a displaydata statement.


Applying formula to existing field
#2

Works like a charm, exactly what I needed. Thank you