I need to store images in Cloudinary, then store their URLs in Airtable, then I need to read the URL back from Airtable and set a picture to that URL. The process is straightforward enough until I add a necessary twist.
The straightforward process is:
- create a new row in Airtable with the “Photo URL” and other properties (eg image description) and a formula field that shows the Rec_id
- Store the Rec_id in Thunkable
- find the row in Airtable by downloading and searching the Rec_id column
- get the row and set the image to the property “Photo URL”
The necessary twist is that I write the Photo URL to one table in Airtable, and read it back from a different table that uses a lookup field to find the “Photo URL” in the first table. In Airtable the field containing the URL shows the URL as normal. However, when I get the property “Photo” of the row and set the image to this, it doesn’t work. After a bit of digging I worked out that the property that comes back is not simply the URL, it is an array, with one item in it - the URL. To set the image I came up with this workaround:
Similarly I noticed that to search for a linked Name (actually a Rec_id) in a list of Rec_ids I had to convert the ‘list’ (an array with one item) to text like this:
Is there a more elegant and/or reliable solution than this?
I have lots of data that is saved and searched in a similar fashion. When it’s just text this workaround is needed.
Any suggestions appreciated.