What's the Best Way to Test a Stored Calc Field Expression without deploying?


Is the recommended best practice to use the stored calc expression in an include statement in a FetchSpec or the projection statement in an EvaluateSpec?

I can think of a few instances where the above methods won’t work:
Some stored calcs that use complex, compound conditional statements won’t be able to be tested in this way.

What are some best practices that people use to test that the stored calc expression will return the correct value(s) without deploying code to an environment?

1 Like

Experimenting with calc expressions?

Came across this today - though not a stored calc but just testing expression engine functions. Type Expr.eval to the rescue

1 Like


If you’re trying to add a new stored calc to an existing type (call it TypeA), then I prefer to use TypeA.evaluate({projection: "whatever.your.expression.(withA == 'filter').is"}) because this will have context of the type you are editing.

1 Like