Help with API GetRows Query partial match?

I am trying to do a simple API query to return all Contacts whose last name is “Smith”.
However I cant seem to partially match on the [Full Name] column.

For example: Lets assume I have the following people in my contacts table.

  • John Smith
  • Jane Smith

I can return the row with John Smith using the following GET call:
https://coda.io/apis/v1/docs/{DocId}/tables/{tableId}/rows?query={FullNameColumnId}:“John Smith”

QUESTION:
How can I return all contacts with last name smith?
I was hoping wild card characters or regex would help but I cant seem to make it behave.
E.g.

  • WILD CARD: query={FullNameColumnId}:“*Smith”
  • Regex: query={FullNameColumnId}:“.*Smith”
    (These don’t work for me, but I have put them here in case someone can point out a simple error I am making)

Finally, this is a simplified example of what I am trying to achieve. For this reason I cannot simply create a last name column and query based on that. If I did the query would fail if a full name or first name is entered.

Thanks for your help!

Hi @Logan_Krantz - Unfortunately this is a known limitation in the query syntax for rows. We currently only support an exact match, which I recognize isn’t going to work for your use case.

One workaround is to load all of the rows from the table, and then do the search / filter within your application. You have complete control over how the search is done, but there may be speed and memory considerations.

We’ve had a few other developers also ask for a more advanced query syntax, and I’ll pass this feedback on to the team.

Hi Eric,

Thanks for your quick and informative response.

Sadly the speed considerations are significant. Due to pagination its common to make 6+ calls. Since the API calls are the bulk of the run time this increases user delay by nearly 6 times compared to a single call with a query.

Please consider this another request for this feature.

Apart from that please also pass on an appreciation for the beautiful piece of software that is coda :grinning:

1 Like

Request noted, and I’ll pass along your appreciation :slight_smile: