Have a clickable image that sends you to a file

Hello all,

I have urls of pictures in a Google Sheet file.

They are displayed as "Image" in AppSheet. It works well. But when I click on the image, it sends me to a page with a blackbackground and the image in the center. I would like to be sent to a file stored in the Drive instead, when the user clicks on the image. Is that possible?

Thank you all.

Solved Solved
0 5 912
1 ACCEPTED SOLUTION

Aurelien
Google Developer Expert
Google Developer Expert

Got it.

Would the Card view layout may help you? You can define an action for each element in the card view.

Aurelien_0-1677752162690.png

Aurelien_1-1677752189074.png

Would that help you?

Other wise, if this is a detail view, you can try it this way:

Aurelien_2-1677752372614.png

 

The mechanism is pretty similar.

View solution in original post

5 REPLIES 5

Aurelien
Google Developer Expert
Google Developer Expert

Hi  @Florent_GESTIN 

Because the colum type is Image, the system action will make the user to see the image.

If you wish the URL to behave like a hyperlink, you will need to change its type to "Url".


@Florent_GESTIN wrote:

I would like to be sent to a file stored in the Drive instead, when the user clicks on the image.


Does the image appears not to be the one in your Drive system?

If you wish to have both the image displayed and the hyperlink feature working, I would suggest to create an action "External: go to an external website", and set its expression with:

TEXT([imageUrl])

Then, you would set this action as a default action where you need it.

Well, I don't think I am doing the right thing.

 

This is the file I ve got : https://docs.google.com/spreadsheets/d/1-V8x2cMvMtYhNtqpyE46dPHHT_kDm_I0eG4XhP7jFiI/edit#gid=0

The pink colums are related to the picture i want to display. The red columns are related to the video I want to be sent to, when the user clicks on the picture (and I don't know if this is possible).

Capture d’écran 2023-03-01 170301.png

 

This is how I have my app so far :

Capture d’écran 2023-03-01 170515.png

The picture can be displayed with this link :

https://drive.google.com/uc?export=view&id=

and if I turn it to a thumbnail or picture type, it works. The picture is displayed. When I click on it, this is what I have, the picture and the black background:

Capture d’écran 2023-03-01 170729.png

But I would like to know if I can be sent to the video instead, when the user clicks on the thumbnail/image.

Aurelien
Google Developer Expert
Google Developer Expert

Got it.

Would the Card view layout may help you? You can define an action for each element in the card view.

Aurelien_0-1677752162690.png

Aurelien_1-1677752189074.png

Would that help you?

Other wise, if this is a detail view, you can try it this way:

Aurelien_2-1677752372614.png

 

The mechanism is pretty similar.

I had in mind the "detail view" to be able to show more content (instead of just a picture, my dataset was simple on purpose for the sake of clarity). But these are some options to consider, I will see if something is missing in the workflow for the needs of that project. 

Thank you @Aurelien for this option I did not consider before (even though I knew these features =D). Even though the click on the image is not exactly as I expected (and maybe it is not possible), your input can be implemented and does the job.