Filterbyformula single quote AND comma in fields -- good times!


#1

Hello!

I’m trying to put together node js logic to find record ids for two concatenated fields as the key field.

I’ve gotten through my issues of having commas in my search strings, but now I have compound issues with both commas and single quotes in my strings.

I’m ending up with a filterbyformula variable that looks like this:
{Song ID} = ‘“A Midsummer’s Breeze”-“Meditations for Relaxation, Vol. 1”’

My logic has found both the single quote and the comma, enclosed both of the constituent pieces in double quotes and then enclosed the entire string in single quote.

Airtable doesn’t like this and cannot find the record.

In the DB, the record looks like this:
A Midsummer’s Breeze-“Meditations for Relaxation, Vol. 1”

Before I make myself nuts trying to suss out a solution, I thought I would ask you trustworthy and kind fellow coders…

Thanks in advance for any help!

Cindy


#2

You can probably change these extra (double!) quotes in %22 instances instead. I haven’t tried the comma myself, but that should be %2C.

Does that work for you? :slight_smile:

Have a look at http://www.asciitable.com and use the hexadecimal values in case of problems.


#3

Thanks for your response! Thinking through it all.

Cindy