Why Does Airtable Search Records Only Allow "String" Field Searches Instead of Non-String Fields like Formula Fields?

This topic was automatically generated from Slack. You can find the original thread here.

I am curious about the Airtable Search Records steps. Right now it only lets the user choose a search field that is a “string” field (i.e. the fieldTypeToPropType function in utils.mjs returns “string” as the prop type).

This seems unnecessarily limiting since there are plenty of times when someone might want to search records based on the value of a non-string field such as a formula field. Is there a technical reason for this limitation that I’m not aware of?

Oh interesting. cc I think you wrote the latest Airtable actions, yea?

The action is using FIND (FIND(stringToFind, whereToSearch,[startFromPosition])) in the filterByFormula parameter, so that requires a string.
https://support.airtable.com/docs/formula-field-reference
The action also has an optional parameter, searchFormula, where you can enter in any search formula.

To search for records using only your own search formula, you could use the “List Records” action which has an optional filterByFormula prop.

Ok, that’s good to know about List Records but hard to discover — I was trying to use the search records step with just the searchFormula filled in but it wasn’t letting me test without putting in data for the Search Field and Search Value, so I gave up and made my own custom component.

My version of the component uses fieldType: "any", for the fieldName prop and it’s working just fine even though the field I chose is a formula field. So I’m wondering if the official version could be changed to support all field types? But I haven’t tested with anything besides the formula field.

cc

Hi Celeste, thanks for flagging this - I’m looking into how we can optimize this action and will follow up on this thread.

, happy to report that the search records step has been updated to accommodate different types - please feel free to give it a test drive, and let us know if you have any feedback! A big thank you to @UR84EMEUT for knocking this out :slightly_smiling_face:

Wonderful, thank you! I will let you know if I run into any issues with it.