Skip to content

Function: makeDynamicSyncTable

core.makeDynamicSyncTable

makeDynamicSyncTable<K, L, ParamDefsT, SchemaT>(__namedParameters): DynamicSyncTableDef<K, L, ParamDefsT, any>

Creates a dynamic sync table definition.

Example

coda.makeDynamicSyncTable({
  name: "MySyncTable",
  getName: async function(context) => {
    const response = await context.fetcher.fetch({method: "GET", url: context.sync.dynamicUrl});
    return response.body.name;
  },
  getName: async function(context) => {
    const response = await context.fetcher.fetch({method: "GET", url: context.sync.dynamicUrl});
    return response.body.browserLink;
  },
  ...
});

Type parameters

Name Type
K extends string
L extends string
ParamDefsT extends ParamDefs
SchemaT extends ObjectSchemaDefinition<K, L, SchemaT>

Parameters

Name Type
__namedParameters Object
__namedParameters.connectionRequirement? ConnectionRequirement
__namedParameters.defaultAddDynamicColumns? boolean
__namedParameters.description? string
__namedParameters.entityName? string
__namedParameters.formula SyncFormulaDef<K, L, ParamDefsT, any>
__namedParameters.getDisplayUrl MetadataFormulaDef
__namedParameters.getName MetadataFormulaDef
__namedParameters.getSchema MetadataFormulaDef
__namedParameters.identityName string
__namedParameters.listDynamicUrls? MetadataFormulaDef
__namedParameters.name string
__namedParameters.placeholderSchema? SchemaT

Returns

DynamicSyncTableDef<K, L, ParamDefsT, any>

Defined in

api.ts:1639