Image field as hyperlink in report

I have an image field type and I want it as a hyperlink in my workflow report.
How do i achieve this?
Please advise.

Thanks.
John

Solved Solved
0 17 2,038
1 ACCEPTED SOLUTION

@John_Henry_Joseph
Can you please check this setting?
Security > Options > Required Image and File URL Signing is explicitly set to OFF

View solution in original post

17 REPLIES 17

@John_Henry_Joseph


OR

EXPRESSION


HYPERLINK(
    CONCATENATE(
        "https://www.appsheet.com/template/gettablefileurl?appName=",
        ENCODEURL("YourAppName-YourAccountID"),
        "&tableName=",
        ENCODEURL("YourTableNameHere"),
        "&fileName=",
        ENCODEURL([ImageColumnName])
    ),
    "Click HERE to view the image"
)

IN TEMPLATE


<<HYPERLINK(CONCATENATE(โ€œhttps://www.appsheet.com/template/gettablefileurl?appName=",ENCODEURL(โ€œYourAppName-YourAccountIDโ€),"... HERE to view the imageโ€)>>


EXAMPLE


<<HYPERLINK(CONCATENATE(โ€œhttps://www.appsheet.com/template/gettablefileurl?appName=",ENCODEURL(โ€œOrderApp-123456โ€),"&tableName... Tableโ€),"&fileName=",ENCODEURL([Product_Images])),โ€œClick HERE to view the imageโ€)>>

I used the below code.

<<IFS(ISNOTBLANK([SamplePhoto]), HYPERLINK(CONCATENATE(
โ€œhttps://www.appsheet.com/template/gettablefileurl?appName=โ€,
ENCODEURL(โ€œERSystem-57572โ€),
โ€œ&tableName=โ€,
ENCODEURL(โ€œTbl_ERChildโ€),
โ€œ&fileName=โ€,
ENCODEURL([SamplePhoto])
),
โ€œClick HERE to view the imageโ€
))>>

But I got the below result

The browser address is also correct.

https://www.appsheet.com/template/gettablefileurl?appName=ERSystem-57572&tableName=Tbl_ERChild&fileN...

Can you please help me out?
Thanks.

@John_Henry_Joseph
Can you please check this setting?
Security > Options > Required Image and File URL Signing is explicitly set to OFF

I disabled now.
But still same result.
Please advise.

Thanks.
John

Can you also verify that you have a ab9bc4a2.SamplePhoto.194702.jpg image file under appsheet > data > ERSystem-57572 > Tbl_ERChild_Images folder?

No. I have them in my own folder.


@John_Henry_Joseph
Can you also check and verify that the default app folder property is inline with your structure?

The default app folder โ€ฆ /appsheet.
But the data is being stored in different folder.
Should I change this path? like what?
pleaseโ€ฆ

Definitely you shall change that, otherwise Workflow will return error as there is no any Tbl_ERChild_Images folder exists under your default app folder. As your current app folder is set under gDrive root, you can change the path string like this:
/ER SYSYEM

Try this

@John_Henry_Joseph
May be you also need to adjust the expression in the workflow. Before changing the expression, test the previous one initially:


EXPRESSION


HYPERLINK(
    CONCATENATE(
        "https://www.appsheet.com/template/gettablefileurl?appName=",
        ENCODEURL("ER SYSTEM"),
        "&tableName=",
        ENCODEURL("Tbl_ERChild_Images"),
        "&fileName=",
        ENCODEURL([ImageColumnName])
    ),
    "Click HERE to view the image"
)

IN TEMPLATE


<<HYPERLINK(CONCATENATE(โ€œhttps://www.appsheet.com/template/gettablefileurl?appName=",ENCODEURL("ER SYSTEMโ€),"&tableName=",ENCODEURL(โ€œTbl_ERChild_Imagesโ€),"&fileName=",ENCODEURL([ImageColumnName])),โ€œClick HERE to view the imageโ€)>>


EXAMPLE


<<HYPERLINK(CONCATENATE(โ€œhttps://www.appsheet.com/template/gettablefileurl?appName=",ENCODEURL("ER SYSTEMโ€),"&tableName=",ENCODEURL(โ€œTbl_ERChild_Imagesโ€),"&fileName=",ENCODEURL([Product_Images])),โ€œClick HERE to view the imageโ€)>>

I am Sorry Mr. Levent. I failed after many attempts.
I did the following.

  1. Change the default location as โ€œ/ER Systemโ€

  2. Change the expression as you advised.

<<IFS(ISNOTBLANK([SamplePhoto]),
HYPERLINK(CONCATENATE(โ€œhttps://www.appsheet.com/template/gettablefileurl?appName=",ENCODEURL("ER SYSTEMโ€),"&tableName=",ENCODEURL(โ€œTbl_ERChild_Imagesโ€),"&fileName=",ENCODEURL([SamplePhoto])),โ€œClick HERE to view the imageโ€))>>

Where [SamplePhoto] is the column name.

However, I am failed and getting the same error " 404 - File or directory not found."

Please bare with me.

Thanks.

@LeventK,
Is it possible to shift my tables from โ€œER Systemโ€ to appsheet default folder?
Because, when I tested the Image Url, it worked from default location.
https://www.appsheet.com/template/gettablefileurl?appName=ERSystem-575724&tableName=Tbl_ERChild&file...

here, Instead of appName=ERSystem-575724, i put โ€œER Systemโ€โ€ฆ the link is not working.
No ideaโ€ฆ how do I manage.

@John_Henry_Joseph
The image URL had worked with me as well.


I may advise not changing the appname parameter in the image URL and leave it as itโ€™s. Can you post me a screenshot from appsheet > data > ERSystem-575724 folder as well? Sorry for bothering you with these.

@LeventK,

Yes. You are certainly right. Physically changed the default location as you advised. But in the url coding, I kept the appname as ERSystem-575724 and you know whatโ€ฆ its working nicely.
Love You & Appsheet.
Thanks for your continues effort in this regard.

John

@John_Henry_Joseph
Iโ€™m glad to hear that the issue is resolved now. Congrats for your efforts. Provided you can mark my post as the solution, other community members with similar problems might benefit from it as well. Thanks for your consideration.

@John_Henry_Joseph
I believe you have marked the wrong post as the solution. Post#2 shall be the correct one I believe.

Top Labels in this Space