How to zoom an image in form view by using XY column type

In form view it is not possible to zoom an image with column Type “Image” or “Show”.
This trick uses column type “XY” to zoom an image in form view.

Please watch my video

Here is the sample App “Zoom in Form”. You can find it on my portfolio:
https://www.appsheet.com/portfolio/549987

What it does:

  • Table “Filenames” is read only. A Google App Script runs once a day and pulls in the filenames of images I have in the folder “Images”.
  • In the App I can add a row to table “Zoom in Form”. I can choose a file name and it shows the image with:
    • XY
    • Image
    • Show
  • Zoom is possible only in column type XY
  • This trick is possible only with images that are already uploaded.

I’m happy to hear your ideas :slight_smile:

Here is the Google App Script. I’m not very good in GAS, so maybe someone could advice a better solution?

function Filenames() {
 
  var folder = DriveApp.getFolderById("1XOIlibG31TBpz44MvTzJG9CSSC8MSOyM");
  var contents = folder.getFiles();
  
 var sheet = SpreadsheetApp.getActive().getSheetByName('Filenames');
  sheet.clear();
  sheet.appendRow(['Filename']);
  
  var file;
  var name;
  var link;
  var row; 
  while(contents.hasNext()){
    file = contents.next();
    name = file.getName();
    link = file.getUrl();
    sheet.appendRow([name]);
  }
  
};
2 Likes

So then, the link it grabs is a public URL?

Ups you are right. The expression
SUBSTITUTE(CONCATENATE(“https://www.appsheet.com/template/gettablefileurl?appName=ZoominForm-549987&tableName=Zoom in Form&fileName=Images/”,[Filename]), " ", “%20”)
creates a link like
https://www.appsheet.com/template/gettablefileurl?appName=ZoominForm-549987&tableName=Zoom%20in%20Form&fileName=Images/undraw_publish_article_icso.png
which is a publik URL.

Why is that so?

adding @Aleksi

1 Like

@Fabian What do you mean by “Why is that so?”. Sorry I couldn’t understand your question.

1 Like

@Aleksi isn’t that unsecure? I mean, I would expect, that AppSheet would ask for login to see the image.
See also: