Dynamic sync table features properties after oauth token refresh

Dear Coda Community,

I ran into a strange problem when using a dynamic synch table. When the oauth token expires and is refreshed, the table “invents” featured properties. It’s kind of hard to explain, that’s why I created this video: column featuring bug - YouTube

I do not feature any columns, ever:

  getSchema: async function (context, _, { sheetName, startColumn, endColumn, startRow }) {

    let properties: coda.ObjectSchemaProperties = {};

    let idProperty = 'rowNumber';
    properties[idProperty] = {
      type: coda.ValueType.Number,
    }

    let displayProperty = 'rowName';
    properties[displayProperty] = {
      type: coda.ValueType.String,
    }

   //more code here to fetch additional properties dynamically

    return coda.makeObjectSchema({
      properties: properties,
      displayProperty: displayProperty,
      idProperty: idProperty,
      featuredProperties: [],
    });
  },

I don’t know what I’m doing wrong here… Can you help me please?

Thanks and best regards
Benno

Hi @Benno_Baumgartner - These featured columns that are appearing are likely do to the sync table setting “Add newly found columns”:

image

When Coda detects a new property in your schema it will add it to the table as a new column. The toggle defaults to on, but you can change the default in your code:

// A dynamic sync table for the rows of a dataset.
pack.addDynamicSyncTable({
  // ...
  defaultAddDynamicColumns: false,
});

Not seeing your code I can’t tell why Coda is detecting the same properties as new ones.