These posts are asking about a feature similar to the “filterByFormula” in the standard API, to programmatically filter record selection.
Can table.selectRecordsAsync() query a table or view? Scripting app
I see that you can get all records from a table or view - and even sort them. But what if you want a subset - for example all those records connected to another record? It’s not always possible or desirable to create views for this type of thing?
More efficient way to query records? Scripting app
Is there a way to retrieve specific records without iterating through all the results of a table using table.selectRecordsAsync() or view.selectRecordsAsync()? Something like SELECT / WHERE queries in SQL? Or in AirTable terms, a Filter? This would be far more efficient than having to iterate through returned records checking for the records I’m interested in…
My request is slightly different and I think falls into the “interactive” idea behind the scripting block: session.selectedRecords() .
The idea
Each record can be selected with a checkbox on the far left-hand side of the row, or all records can be selected from the box at the top. The UI allows users to “Send” or “Delete” the selected records from the base when right-clicking after selection.
Providing a scripting block some way to detect which records are selected could help with more granular use-cases. For example, the user wants to update 4 records in “GroupX” and 2 records in “GroupY”. Right now, there are easy ways to filter records matching “GroupX” OR “GroupY” but not a mix (absent other algorithms for detecting the desired records).
Potential issues
One implementation issue that comes to mind is when does this selection get stored. If a user runs a scripting block with “N” records selected, provides some information via an input.textAsync() and deselects some records before submitting the text, does the script use the selected records at script start or at moment of execution?
What do others think? And anyone from Airtable, can you give hints if this might be in the works (or any other session variables for that matter)?
... View more