Help

Anybody managed to break image string? (Airtable way vs Zapier way)

Topic Labels: ImportingExporting
418 0
cancel
Showing results for 
Search instead for 
Did you mean: 
dontknow
4 - Data Explorer
4 - Data Explorer

The topic was closed as resolved so I created new post, wanted to list the formulas I used to get it done.

https://community.airtable.com/t/anybody-managed-to-break-image-string-using-integromat/33085/4

Excellent, many thanks. I was trying to do this with Zapier and it works kind of OK but it required me to go to the CSV file created by Zapier and then specifically click on the concatenated cells for NEW line entries (do not select the whole column, just the new cell) and select “convert text to columns” which worked OK but requires many more steps.

Thanks @ScottWorld the suggested @Justin_Barrett solution really helps and makes it nice.

I had to fine tune it because the formula requires adjusting to the specific length of the image file NAMES. Picture files names LENGTH stays same for pictures taken within the Airtable mobile app but their length will vary for pictures uploaded e.g. from desktop. In my case I adjusted the formula to accommodate file names from about 1 - 70 characters. It was a lot of trying and testing. The solution relies on stability of the Airtable picture storage path, should the storage path change the formulas would break again. But it works fine otherwise…

Formulas I used:

Column 1

IF(
    Images,
    ((LEN(Images) - LEN(SUBSTITUTE(Images, ",", ""))) + 1)
    & " - "
    & SUBSTITUTE(SUBSTITUTE(Images, "(", REPT(" ", 100)), ")", REPT(" ", 100))
)

Column 2

SUBSTITUTE(SUBSTITUTE({Column 1}, "https", REPT(" ", 100) & "https"), ".pdf", ".pdf" & REPT(" ", 100))

ImagePath1 (column with the first image path)

TRIM(MID({Column 2}, FIND("https", {Column 2}), 180))

ImagePath2 (column with the second image path)

IF({ImagePath1}, TRIM(MID({Column}, FIND("https", {Column 2}, FIND({ImagePath1}, {Column 2}) + 5), 180)))

ImagePath3 (column with the third image path)

IF({ImagePath2}, TRIM(MID({Column 2}, FIND("https", {Column 2}, FIND({ImagePath2}, {Column 2}) + 5), 180)))

and so on…

0 Replies 0