Jun 05, 2024 01:40 AM
Hello ,
I am trying to link a row to another row via an automation script , how can I get the url link to a cell because when I do a for(let record of tableQuery.records) i can only get the record.id or record.name isn't their a way to get the record.urlLink ?
Thanks for the help
Solved! Go to Solution.
Jun 05, 2024 10:36 AM - edited Jun 05, 2024 10:39 AM
Like @TheTimeSavingCo already wrote you can gues the url by your self. Just open manualy a record in your base and than copy the url from your browser. This url contains the id of your base, table, view and the record. The id of the record is at the end of the url. In your script, you can use the url which you copied but you have to replace the record_id part.
For example if this is the URL you copied: https://airtable.com/appID/tableID/viewId/recYqE6YKYkF3cUcL
The bold marked text is the record_ID which you have to replace in your script.
In your script you can build the url like this: "https://airtable.com/appID/tableID/viewId/" + record.id;
Jun 05, 2024 02:22 AM
I don't think that's possible I'm afraid. You could try constructing it yourself with the app ID, table ID and record ID?
How would the record's url link help you with linking records to each other though?
And here's the documentation for the linked record field if that's helpful: https://airtable.com/developers/scripting/api/cell_values#multiple-record-links
Jun 05, 2024 10:36 AM - edited Jun 05, 2024 10:39 AM
Like @TheTimeSavingCo already wrote you can gues the url by your self. Just open manualy a record in your base and than copy the url from your browser. This url contains the id of your base, table, view and the record. The id of the record is at the end of the url. In your script, you can use the url which you copied but you have to replace the record_id part.
For example if this is the URL you copied: https://airtable.com/appID/tableID/viewId/recYqE6YKYkF3cUcL
The bold marked text is the record_ID which you have to replace in your script.
In your script you can build the url like this: "https://airtable.com/appID/tableID/viewId/" + record.id;
Jun 11, 2024 12:23 AM
Thank you , I proceeded eventually with this method also .