Link to image is different in generated PDF

My App includes a Workflow that generates a PDF from a Google Doc template. I have a virtual column in a specific table that creates a URL to an image using an App Formula for the column. Within the App this URL works properly. I have adjusted the security settings accordingly so that I can copy and past the URL into a browser and see the image. This virtual column is also included in my report. However the links in the report are not functioning. In looking at the url in detail I noticed that the url in the report is slightly different than what is showing in the app. Below is the App formula expression for my virtual column โ€œLink to Receiptโ€. I have included the URL as it appears in the app as well as the URL as it appears in the report. In the report a โ€œ25โ€ is inserted just after the % symbol into the url. I have hidden the actual code for the app (privacy concerns) so the urls below will not work.

App Formula:
IF(ISNOTBLANK([Receipt]),CONCATENATE(โ€œhttps://www.appsheet.com/template/gettablefileurl?appName=โ€, ENCODEURL(โ€œExpenses-???โ€œ), โ€œ&tableName=โ€, ENCODEURL(โ€ExpensesTableโ€),โ€œ&fileName=โ€, ENCODEURL([Receipt])), โ€œNoneโ€)

URL as it appears in the App:
https://www.appsheet.com/template/gettablefileurl?appName=Expenses-???&tableName=ExpensesTable&fileName=ExpensesTable_Images%2F21-ab5ccbc0.Receipt.110308.jpg

URL as it appears in the report:
https://www.appsheet.com/template/gettablefileurl?appName=Expenses-???&tableName=ExpensesTable&fileName=ExpensesTable_Images%252F21-ab5ccbc0.Receipt.110308.jpg

Can anyone shed some light on why this url is changing in the report?

Thanks

Solved Solved
0 3 251
1 ACCEPTED SOLUTION

I made the following change to the App formula for my Virtual Column โ€œLink to Receiptโ€ and it is now working: I donโ€™t use the virtual column within the App, it is only used to create the link for the report.

IF(ISNOTBLANK([Receipt]),CONCATENATE(โ€œhttps://www.appsheet.com/template/gettablefileurl?appName=","Expenses-???&tableName=โ€,โ€ExpensesTable&fileName=โ€,[Receipt]),โ€œNoneโ€)

Thanks for the help. Your comment guided me where to look to solve the issue.

View solution in original post

3 REPLIES 3

%2f is the URL encoding of the forward slash in the file path /

%25 is a URL encoding of a percent sign from the previous encoding %

It appears your URL got ran through ENCODEURL() twice in the template. How is your template setup to output the URL?

Here is the expression in the Template to show the โ€œLink to Receiptโ€ virtual column.

<<Hyperlink([Link to Receipt],โ€View Receiptโ€)>>

I made the following change to the App formula for my Virtual Column โ€œLink to Receiptโ€ and it is now working: I donโ€™t use the virtual column within the App, it is only used to create the link for the report.

IF(ISNOTBLANK([Receipt]),CONCATENATE(โ€œhttps://www.appsheet.com/template/gettablefileurl?appName=","Expenses-???&tableName=โ€,โ€ExpensesTable&fileName=โ€,[Receipt]),โ€œNoneโ€)

Thanks for the help. Your comment guided me where to look to solve the issue.

Top Labels in this Space