Skip to content

Function: executeSyncFormulaFromPackDef


executeSyncFormulaFromPackDef<T>(packDef, syncFormulaName, params, context?, «destructured»?, «destructured»?): Promise<T[]>

Executes multiple iterations of a sync formula in a loop until there is no longer a continuation returned, aggregating each page of results and returning an array with results of all iterations combined and flattened.

NOTE: This currently runs all the iterations in a simple loop, which does not adequately simulate the fact that in a real execution environment each iteration will be run in a completely isolated environment, with absolutely no sharing of state or global variables between iterations.

For now, use coda execute --vm to simulate that level of isolation.

Type parameters

Name Type
T extends object = any


Name Type
packDef BasicPackDefinition
syncFormulaName string
params ParamValues<ParamDefs>
context? SyncExecutionContext
«destructured» ExecuteOptions
«destructured» ContextOptions



Defined in