Type alias: MetadataFormula¶
A variety of tasks like those mentioned above can all be accomplished with formulas that
share the same structure, so all of these supporting features are defined as
You typically do not need to define a
MetadataFormula explicitly, but rather can simply define
formula boilerplate to make it look like a complete Coda formula.
All metadata functions are passed an ExecutionContext as the first parameter, and the optional second parameter is a string whose purpose and value varies depending on the use case. For example, a metadata formula that implements parameter autocomplete will be passed the user's current search if the user has started typing to search for a result. Not all metadata formulas make use of this second parameter.
Autocomplete metadata functions are also passed a third parameter, which is a dictionary that has the values the user has specified for each of the other parameters in the formula (if any), so that the autocomplete options for one parameter can depend on the current values of the others. This is dictionary mapping the names of each parameter to its current value.