Yes, it is possible to refresh the Airtable view after retrieving record IDs from a 3rd party API using the Airtable Blocks SDK. First of all you have Retrieve Record IDs from the 3rd Party API and Update the Table View. myfedloan org bill
Yes, it is possible to refresh the Airtable view after retrieving record IDs from a 3rd party API using the Airtable Blocks SDK. First of all you have Retrieve Record IDs from the 3rd Party API and Update the Table View. myfedloan org bill
Hi Tammy. Thank you for your reply.
Yeah, I can get record ids.
Let's say, I have stored record ids into Array variable in block sdk code.
After this, how can I update the table? I meant , view refresh based on record ids.
Thank you.
Hello,
Yes, it is possible to refresh the view of a table in Airtable using the Blocks SDK after you have obtained the record IDs from the 3rd party API and stored them in an Array variable. To achieve this, you can use the 'table.selectRecords' method provided by the Blocks SDK.
Create an Array variable and store the record IDs returned from the 3rd party API in this array. Get the instance of the table you want to update. You can use 'base.getTableByName' to get the table object. Use the 'table.selectRecords' method to select the records based on the record IDs stored in your Array variable. This will update the view and show only the selected records in the table.
// Assuming you have stored the record IDs in an array called "recordIds"
const table = base.getTableByName('All companies');
// Select the records based on the record IDs
table.selectRecords(recordIds);
// Refresh the view to show the selected records
table.refreshView();
By calling 'table.refreshView()' after 'table.selectRecords', you ensure that the view is updated with the selected records. The 'table.selectRecords' method can take an array of record IDs as an argument, and it will select only those records in the table view. Make sure you have the latest version of the Blocks SDK to access these methods and features. Remember to handle any potential errors or edge cases when working with APIs and record IDs to ensure a smooth user experience.