Skip to content

Function: makeDynamicSyncTable

core.makeDynamicSyncTable

makeDynamicSyncTable<K, L, ParamDefsT, SchemaT>(«destructured»): 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>

Parameters

Name Type
«destructured» Object
› connectionRequirement? ConnectionRequirement
› defaultAddDynamicColumns? boolean
› description? string
› entityName? string
› formula SyncFormulaDef<K, L, ParamDefsT, any>
› getDisplayUrl MetadataFormulaDef
› getName MetadataFormulaDef
› getSchema MetadataFormulaDef
› identityName string
› listDynamicUrls? MetadataFormulaDef
› name string
› placeholderSchema? SchemaT
› propertyOptions? PropertyOptionsMetadataFunction<any>
› searchDynamicUrls? MetadataFormulaDef

Returns

DynamicSyncTableDef<K, L, ParamDefsT, any>

Defined in

api.ts:2283