Hi All,
I am creating a coda pack where I have one syncTable. Based on the parameter, I need to call different API’s and I need to return different schema object values. I am trying to add the schema inside the formula based on the parameter. But I am getting compiled time error as the syntax is not correct. Can you please guide me how can I achieve that ?
pack.addSyncTable({
name: "Users",
//schema: UserSchema,
//identityName: "UserIdentity",
formula: {
name: "SyncUsers",
description: "Sync Users Table",
parameters: [coda.makeParameter({
type: coda.ParameterType.String,
name: "docName",
description: "Name of the document",
optional: false,
})
],
resultType : coda.ValueType.Array,
schema : UserSchema,
isAction: true,
execute: async function ([docName], context) {
return ""
}
Thanks,
Elam