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

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]);
  }
  
};
3 4 1,246
  • UX
4 REPLIES 4

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

@Fabian What do you mean by โ€œWhy is that so?โ€. Sorry I couldnโ€™t understand your question.

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

Top Labels in this Space