Copy of Snippet "Airtable multi-record getter"

Allows you to get more than one record from the same table in an Airtable base

The snippet finds two records in the same table given their record IDs, using a single urlload command.
It is recommended to look at the original snippet for better understanding of how this system works.

{note}{formtext: name=apikey} {formtext: name=base}{endnote}
{if: apikey <> "" and base <> ""}
{recid1="recGSuKxRFEd6TF7a"}{recid2="recHS96qKr9nbd8tj"}
{urlload: https://api.airtable.com/v0/{=base}/VWB?filterByFormula=OR(%7BRecord ID%7D%3D'{=recid1}'%2C%7BRecord ID%7D%3D'{=recid2}'); method=GET; done=(res) -> ["url_response"=catch(fromJSON(res), "???")]; headers=Authorization=Bearer {=apikey}}
Data received
{records=catch(url_response.records, [])}
Count of records received: {=count(records)} Should be 2
{rec1=records[1]}
{rec2=records[2]}
{type_a=rec1}
{type_b=rec2}
{if: 1 == 2}
{type_a=rec2}
{type_b=rec1}
{endif}
{else}
Enter apikey and base to proceed

To get the apikey, generate it on your Airtable account page (keep it a secret)

If you have the record URL as: https://airtable.com/appW0YBv9zvXFQcO6/tblHDV2wc3yp0T7IQ/viwqYnynm1ysWpg6Y/recltLpNVfdtUlVtB?blocks=hide, then base=appW0...Qc06, and recordid=rec...VtB.

For an interactive demo of Airtable's API, visit their API page and choose your base. On the left you should choose "VWB Table" and then "Fields", "List records" or "Retrieve a record". On the right you will see various outputs relevant to your base.
{endif}