Hyperlink in workflow template. Need a help ...

expressions
(tsuji koichi) #1

Hyperlink in workflow template.

Need a help from community.

I generated the virtual column to pick up a url link to the image.

The app formula is something like ;

hyperlink(concatenate(“https://www.appsheet.com/template/gettablefileurl?appName=APPID&tableName=TABLENAME&fileName=”,[Photo]), ‘Link to URL’)

This VC is named as ‘Link to Image’

This generates hyperlink to the image file, opening a browser to view the image which is stored in the same field, column name [Photo].

What I m trying to do is to put a hyperlink (shortened) into the workflow template.

On the template, i put expression of ‘<<[Link to Image]>>’ to create the link to image file so that the user can hit the link text and jump the images.

However, currently i only get the full path of the image URL instead of shortened text.

I just want to show and display ‘Link to URL’ on the final output report instead of full path.

How can I achieve ?

(tsuji koichi) #2

plus.google.com - I have a virtual field calculated by: = HYPERLINK([TargetURL], “Go there”) …

Found the same sort of query in posts here.

The bug is causing the problem?

The bug yet fixed?

I have a virtual field calculated by: = HYPERLINK([TargetURL], “Go there”) … plus.google.com

(Reza Raoofi) #3

Adding @Philip_Garrett_Appsh

(Philip Garrett) #4

@tsuji_koichi @RezaRaoofi

We cannot allow you to populate a data field with HTML, include that data field in a workflow template, and display the result as HTML. Doing this would enable Cross Site Scripting attacks.

I have just added topic “HTML Encoding to Prevent Cross Site Scripting Attacks” to explain this. See help.appsheet.com - Template Variables

That topic says:

We always HTML encode field values when they are displayed in an HTML document. HTML encoding ensures that field values are displayed as simple text by the browser and that field values are not interpreted by the browser as HTML. This is essential to prevent XSS (Cross Site Scripting) attacks in which a user enters Java script in a field. If that field was rendered into an HTML document without being HTML encoded, it would allow the user to launch a Cross Site Scripting attack by entering something like:

I am still working on a fuller response to @tsuji_koichi question, but wanted to explain why the approach of including HTML in a data field is not allowed because it enables Cross Site Scripting attacks. We block this for your protection. Template Variables help.appsheet.com

(Philip Garrett) #5

@tsuji_koichi @RezaRaoofi

Try including this in the template:

HYPERLINK(CONCATENATE(“https://www.appsheet.com/template/gettablefileurl?appName=YourApp-54321&tableName=YourTableName&resizeImage=true&imageWidth=600&fileName=”,TEXT([Image Field Name])), ‘My Photo Link’)

I added topic “Hyperlink Expressions” in this article to described how to do this. See https://help.appsheet.com/behavior/workflow-sending-email/template-variables

(tsuji koichi) #6

@Philip_Garrett_Appsh Hi Phil thank you for your detailed explanations.and update the support document as well. I managed to place hyperlink on the template. Perfect! Thank you!