Add search functionality to your dynamic sync tables

Dynamic sync tables allow a user to select which dataset to load from (Jira table, Typeform form, etc), but when there are too many choices it becomes hard for the user to find the one they are looking for. Organizing the list of datasets into folders can help, but with long lists it may not be enough.

To help with this, we just launched the ability for users to search through the available datasets:

image

To enable this, add a searchDynamicUrls function to your dynamic sync table definition. This function works very similar to listDynamicUrls, but where the 2nd parameter is the search query (instead of the parent dynamic URL).

pack.addDynamicSyncTable({
  // ...
  searchDynamicUrls: async function (context, search) {
    // Filter the projects using the search query.
    let url = coda.withQueryParams("https://api.example.com/projects", {
      q: search,
    });
    // Fetch and return the matching projects...
  },
  // ...
});

You can read more about it in the Dynamic Sync Tables guide, and you can see examples of searchDynamicUrls in practice in the Typeform and Open Data NY sample Packs.

If you have a Pack with a dynamic sync table I’d encourage you to add this new feature. It should be fairly quickly to implement and can make your Pack much simpler to use.

5 Likes

I had no idea you could do folders there, that’s awesome! Searching is also great, thank you for this

1 Like