I am creating a pack and I need to use an authentification key for some formulas.
When a formula needs the key (and therefore there is an autocomplete to select the one you want to use), the other autocompletes of the formula work normally. But if in a formula I specify connectionRequirement: coda.ConnectionRequirement.None
or connectionRequirement: coda.ConnectionRequirement.Optional
the other autocomplete don’t display any suggestion.
Am I doing something wrong or is it a bug?
With connection requirement
Without connection requirement
Example code
pack.setUserAuthentication({
type: coda.AuthenticationType.QueryParamToken,
paramName: "key"
});
pack.addFormula({
name: "Test",
description: "Formula with autocomplete",
resultType: coda.ValueType.String,
/**
* If I add
* connectionRequirement: coda.ConnectionRequirement.None
* or
* connectionRequirement: coda.ConnectionRequirement.Optional
* then the autocomplete suggestions are not displayed
*/
parameters: [
coda.makeParameter({
type: coda.ParameterType.String,
name: "autocomplete",
description: "Autocomplete example",
autocomplete: ["Lorem", "ipsum"]
})
],
execute: async function ([autocomplete], context) {
return autocomplete;
}
});
²