Jan 17, 2019 03:10 PM
My “Published URL” column contains URLs of web pages.
Through API, I would like to be able to pull only the record containing a URL I supply in the call.
I am already successfully making a curl call with this…
$base = 'appPtTr2kigmLlCP8';
$table = 'Content';
$view = urlencode('Published (Robert)');
// $fields = urlencode('Published URL'); // Only return these fields, cf. https://community.airtable.com/t/using-fields-filter-in-list-of-records/940
if (!empty($offset)) {
$q_offset = '&offset='.$offset;
}
$airtable_url = 'https://api.airtable.com/v0/' . $base . '/' . $table;
// construct the url query
$url = 'https://api.airtable.com/v0/' . $base . '/' . $table . '?maxRecords=5&pagesize=1000&view='.$view . $q_offset;
But how can I make use of the relevant feature (is it filterByFormula?) to add
Elsewhere on the forum, I have seen reference like…
filterByFormula=SEARCH(‘riva’%2C+%7BLast+Name%7D)
But I have not crystallised how I would perform a query for the record with a specific “Published URL” value.
How do I do this, and what do I need to know about encoding a URL and the whole query parameter pair?
Thanks.
May 11, 2021 04:50 AM
კაი კაცი ხარ ბრააააატ
May 26, 2021 03:38 PM
What would be the syntax for something like this:
filterByFormula={Field Name}=ANY["value1", "value2", "value2", "value2"]
Jun 27, 2021 04:03 AM
Hi @dilipborad
I an new to Airtable and have a similar requirement. I have a simple database with keywords. I’m looking for a get API that will search input string in the database and if available, output the same.
It looks like Regex can resolve this. What would the syntax look like?
thanks!
Jun 27, 2021 09:48 PM
@Prashanth_Kumar,
If we have a list of a keyword like
Now if you use.
REGEX_MATCH({Keywords}, ‘Tiger’)
OR
REGEX_MATCH({Keywords}, ‘Lio’);
Jun 28, 2021 10:17 AM
Thank you - I was looking for the JS Script API, which I was able to figure using the attached link
Feb 24, 2022 07:54 AM
I have a lookup field that contains comma separated values, like so: pg, cc, pg
How might I structure my formula to say, “If my field contains ‘cc’”…?
Feb 24, 2022 09:01 AM
I figured it out. The lookup field was pulling from a single line text field. Once I changed it to a single select field, I was able to use a FIND formula:
FIND("cc",{Learning Center ID})>0
Feb 24, 2022 11:57 PM
When using filterByFormula
, the new filter will be applied on top of the existing View filters to further filter the results down. It will not replace filters already on your View.
Jul 05, 2022 12:40 PM
Did you manage to filter by a field id rather than the name? I could not get it working, and its driving me crazy.