Get Table Data which is a View of another Table

I have a folder/section/table structure like this:
Masters

  • Master Projects
    • Project 1
  • Master Products
    • All Products
    • Client View of All Products

Project 1

  • View of Client View filtering by Project Name

I am trying to use the api to return the data in the “View of Client View filtering by Project Name” table,
however there does not appear to be a way to return “Views” in the api.

Am I missing something somewhat basic here? Or should I be rethinking the way I structure this data?

My team are not programmers, so I want to make it simple for them to filter the data IN Coda. Then output it for formatting via an app I created that works with the json output via python.

Much appreciated in advance,
~Josh

edit: Quick side note as I try to achieve this, I do not want to hard code the filters for the client view, as we may want to change the filtering depending on project, and our team cannot manipulate my code. I also don’t want them to have to use a new Doc for the projects ( was reading up on Blog post on one-way sync between two Coda docs ), but if that is the suggested workaround, I may have to adopt this approach.

1 Like

Every work around I try, I keep coming back to “if there was only a way to access a view from the api, all problems would be solved.”

Is it possible to find a View Table via the API?

Hi Joshua, unfortunately this is currently not yet possible, but there is a workaround.

Instead of setting a filter formula on the view, add a new column like “Filter for View of Client View by Project Name” and set that formula there. Then add set the filter formula to be “[Filter for View of Client View by Project Name]”. When querying the API, you can then use query parameter on listRows to return only rows for which that column is true. That would allow your team to still update the “filter” for the view by editing the column formula instead.

Hi Oleg,
I have embedded an example of what I am talking about, this might make a little more sense than my explanation. I have altered it slightly since then anyways, to visualize slightly different.

This is a great output for our own records, however if we want to export only the client view of their Project, I currently have no way for my team to easily select and manipulate the output data.

Thanks for your help :smiley:

Right, so you could get the data for just one of the projects by using a query parameter value of "Project":"Project 1" when retrieving these rows. In any case, you’ll get values for all of the columns in the table using the API, even the hidden ones.

I believe I get it, I have updated the above table.

This will definitely get me started on the right path.
Are there any plans in the future to give the API access to a “View” as its own table?

Thank you again Oleg for the help :smiley:
~Josh

Sorry for the late reply - we have API support for Views on our backlog, but no release plans or an ETA at this time.

Thanks for valuable suggestion @oleg and it’s good workaround.

We have an update to share – views are now supported by the API.

You can list/get views in a doc as well as list the rows in them. To insert, update, or delete rows in a view, do so on the base table.

1 Like

This is a huge help @oleg!
Awesome news.

Hello - I’m unable to access the listViewRows function with the Google App Script API, is it possible that the function is at the HEAD and not in the named version 5 of the Coda Google App Script API?

47%20PM

Hi @Erwin_Ocampo, sorry for the delay. FYI, we released an updated version of the library - you’ll want to be on version 7, as of this date, to have access to these new functions.

1 Like