Airtable - Finding exact Number

Hi guys,
just want to ask if anyone may can help me with this one: I’m looking for an easy way to search for an exact number in an array.

I have this Table “User Air ID” with lots of numbers like “35, 65, 76, 654”. What I want to do to filter a list, I want to make a “filterByFormula” looking for entries containing #65.

When using the functions FIND and SEARCH I not only get the results for number 65 but also for rows containing number 654. That’s a correct results as 65 is also part of 654. Does anyone know how to set up the correct formula for ignoring other numbers than just the 65?

Hi @mazze,

This worked for me:

Here: Input 19 is a input for search, “Name” is the name of the column I’m searching in. This column type is Text.

Best,
Victor.

1 Like

Thanks for the fast reply :slight_smile:

But this kind of query only gets a result when 65 is the only number in the array - and I have arrays with like 50 different numbers and want to know if it contains the specific search number.

Hi @mazze,

I tested it on the following record values in Name field:
Image1
Image11
Image111
Image1111
Image11111

This filter returned the record exactly matching the string which I entered in the input field.
May be I misunderstood what you need?

Best,
Victor

That could be. Sorry - my English may not the best here.

I try to explain it another way:

Let’s say I have 3 strings:
String a: “35, 65, 43, 654”
String b: “23, 54, 26, 65”
String c: “654, 23, 26”

And my search term is “65”. I only want to get the records from String a and b as they are containing #65 but not String c as it does not contain the 65.
Using Find and Search I get all 3 strings as a result as the 65 can be also found in String C as part of 654.

When I try the field name = 65 it don’t return any String as it seems to look for a String only containing the 65 (or I am doing something wrong :thinking:)

Hope that makes it a bit more clear? :slight_smile:

Hi @mazze,

Ok, now I get it.
I guess you could try to use REGEX_MATCH function, to form a regular expression for the filter. Sorry, I can’t provide the expression - I’m not such a big expert in this, it’s a whole another world :slight_smile: .

Best regards, Victor.

Hi @mazze ,
Maybe as a hack/workaround since it is a string, try to search for “, 65,” or “65,”. If User needs to input a number you can concatenate then the comma prior to making the search or where you filter it (filterByFormula). Then the “EQUAL” should work fine. Only challenge here is if number is in last position now like “, 65”.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.