Rich valueFormat and Relational Column Query

I am trying to query the Coda API using valueFormat=rich. When I use valueFormat=simple and query="animal":1, where animal is a relational column, I only get back the records with 1 in that column. But with the rich valueFormat, the relational column is shown like {"animal": { "name": 1 }, and doing a query like query="":1 returns 400 Bad Result. Is it possible to query on relational columns with the rich valueFormat? Thanks!

Hi @Brian_Seidman - Thanks for providing the details here, and sorry it wasn’t working as expected. I tested it myself locally and it does appear we have a bug here. In general our query feature of the listRows endpoint isn’t very sophisticated, and it seems that we aren’t handling rich values correctly.

I filed a bug with the engineering team, but I don’t know when they’ll be able to get to it. In the mean time I think a decent workaround would be to have a 2nd column that uses a formula to extra just the name of the relation column, and then query based on that new column.

@Eric_Koleda, thanks for your response. Your workaround makes sense to me. I actually worked around it in a similar but slightly different way. My reason for using rich was because, given the presence of relational data coming from another table, I wanted the table ID and row ID that come through the API when using a relational column so that I could run secondary API calls to get the related data from the other tables. But, I found that if you have a relational column and you choose “Add a related column,” that information is returned “first level” from the API (so not nested within an object, but equal to other columns), and then using the query parameter does work. That is, rather than trying to query on table_Animal (relational column), if I add the related column Animal, I can query on that instead.

Additionally, at the point that I’m adding those related columns, I’m finding all the information I need from the related table is now shown in my first table and returned by the API, so I don’t actually need rich at all; simpleWithArrays works fine.

So, like you said, a usable workaround is to have a second column that extracts/repeats information from the relational column, but in my case I did it with a “related column” rather than a formula.

Thanks again!