Save image retrieved from URL

Viktor
Participant V

Hello,

I have an issue with saving images that are retrieved from a URL:

In particular, I have to generate a barcode through barcodesinc.com (example: https://www.barcodesinc.com/generator/image.php?code=1c7e0d8a&style=197&type=C128B&height=50&xres=1&...) which takes an ID generated by Appsheet and includes it in the URL which then returns an image.

Now, Iโ€™m storing this image in an โ€œImageโ€ column, and would seem to work (I see the picture of the barcode when Iโ€™m still editing the row in the app). The thing is, when the row is added to the table, I have a workflow that creates a PDF which includes some of the columns of this row, including the barcode. But, the barcode doesnโ€™t seem to show up on the PDF! Rather, a blank box shows where the barcode should be, which is clickable and sends me to the URL that it saved. Furthermore, it did seem to work once, some time ago, so it should certainly be possible, but I do not know what has changed (lot of things have changed) since then unfortunately. Does anyone have any ideas?

Best regards

Solved Solved
2 9 1,079
1 ACCEPTED SOLUTION

@Viktor
Remove that physical column from the back-end, regenerate your column structure and create a Virtual Column of Image Type and in the Content property of this column, use a CONCATENATE expression:

CONCATENATE(
    "https://www.barcodesinc.com/generator/image.php?code=",
    [YourColumnName],
    "&style=197&type=C128B&height=50&xres=1&font=3"
)

and simply refer to this Virtual image column in your PDF template:

<<[Virtual_Image_Column_Name]>>

View solution in original post

9 REPLIES 9

Try to use googleapisโ€ฆ

LeventK
Participant V

@Viktor
Is your column (where you store that barcode image) a physical column in your back-end gSheet or a virtual column?

@LeventK The column is a physical one, stored in the backend sheet, and just contains the URL that returns the image

@Viktor
Remove that physical column from the back-end, regenerate your column structure and create a Virtual Column of Image Type and in the Content property of this column, use a CONCATENATE expression:

CONCATENATE(
    "https://www.barcodesinc.com/generator/image.php?code=",
    [YourColumnName],
    "&style=197&type=C128B&height=50&xres=1&font=3"
)

and simply refer to this Virtual image column in your PDF template:

<<[Virtual_Image_Column_Name]>>

@LeventK Thanks for the swift reply. Iโ€™ll let you know how it goes

Youโ€™re welcome, truly my pleasure

@LeventK That seemed to solve the problem! Thank you. Any ideas why a physical column doesnโ€™t work? Just out of curiosity

@Viktor
Virtual Columns are re-computed on each sync. The workflow action and the creation of the PDF is a quick action and when you use a physical image column where the content is HTTP based, than itโ€™s a time-consuming work to fetch that image from web to the template and therefore it appears as blank. As a point; the issue is not the same provided the physical image columnโ€™s content is residing in the appsheet appโ€™s gDrive designated folder. With using the Virtual Column, you always have the image in your app. The cons of this is you need to sacrifice from the appโ€™s sync time a bit (but not much for sure).

I appreciate provided you mark my reply post as the solution as other community members might benefit from that if-and-when they search the post archive with the solution tag. Thanks.

I am creating a Virtual Column to generate a BarCode [QRCode] but what to copy this to my datasource (Smartsheet) [QR Code] (with space) so that it can be printed on a PO.

When I reference the Virtual column with the Smartsheet reference column =[QRCode] the field is blank.

Can yo advise how to retrieve this Virtual Column information

Many thanks
Dave

Top Labels in this Space