Extract image url from canvas column

Is it possible for me to use a formula to extract image inside a canvas column, in which it contains text and image and then text and image, into another column, text, image url, text ,image url?

Thanks!

yes, you can.

one way is to use the _merge().toText().parseJson(‘url’) trick.
but the _merge() function is a hidden unsupported (but oft-used) function.

see Post by Paul_Danyliuk

the other way that only works inside a button or automation is the toHtml() function (also hidden and unsupported) that lets you scan through the HTML of a page and find the urls of any images.

both have worked reliably for me, but they are unsupported, so may change without notice.

for a more supported solution, its best to save the URLs for your images in a table as text and then refer to them with the image() function when you want to show the image.

1 Like

hi, thanks for you replay

the _merge and parseJson trick is not working. I could get url from image column but i couldnot get url from image inside the canvas column.

are there any other way you could suggest

hi @Korn_Tris , we all know that adding a sample doc is the way forward. I am going to give you one suggestion:

thisRow.Notes._merge().ToText().ParseJSON("*..url")

in this scenario ‘Notes’ is the canvas column and you only have one URL in the canvas column.

Cheers, Christiaan

1 Like

thanks a lot, @Christiaan_Huizer ,

However, i tried to formulate the column [content_extract_image_url] to extract image form column [content]

however it show blank.

here is a sample doc

yes, because you asked for something else than what showed in your doc, see below.

thisRow.Notes.ForEach(CurrentValue._merge().ToText().ParseJSON("$.publicUrl"))

1 Like

i tried your formula but it still does not show anything in the cell. I’m wondering is you [note] column is a image column instead of canvas column? that’s why it’s not working in mine?

what i’m trying to get here is extract url from multiple images in the canvas column

I made the adjustment in your doc, in the doc you had images in an image column.

If you want free support from volunteers like me, clarity is key.

The canvas does not give back the images:

good luck

1 Like