Reviving the terminally beta Snapshot feature

Hi All,

I’m currently working to revive the Snapshot function and make it a stable production feature. The original purpose of this function was to put chart images into reports generated by Scheduled Report workflows. The Snapshot function would be used in the template usually with a deeplink passed in as a parameter. The function would then take the html for the chart and convert it to an image which would then be embedded in the pdf report, or anything using templating. The previous implementation had many issues which prevented it from reaching full production. We are now in the process of reviving this feature and have identified a better method for building a stable feature.

Currently the majority of our use cases include generating reports which require charts and internal maps like building maps. Here I want to the poll the community on any other capabilities snapshot could support, and how long lived the images should be, as in they are only needed for report generation and can be discarded after or otherwise. So far I have assumed temporary, but I would appreciate feedback on this as well as any other feedback that would be pertinent.

Thanks,
Josh
Appsheet Team

2 13 933
13 REPLIES 13

Steve
Participant V

Perhaps an explanation of what its original intent was?

Good point, I edited the original post with more context.

Anthony_Nel
Participant IV

Hi Josh,

My Potential usage case:

Embedded Charts and Maps on reports

Retention around 7 days (for a re-run in the event of a crash) - unless they can be dynamically re-generated of course

Desperately need this to be revived. Same usage case as pretty much everyone else - we need dynamically updating images in reports. +1

I was actually pondering on whether or not @Jonathon 's SVG approach would work in reports. Has this been attempted?

From tests that I have done, SVG’s do not work in reports.

Although the snapshot feature could remedy this, or some improvements to the engine that is rendering and pdfing the reports… Which is likely not a trivial task.

I think the images would only need to be created for report insertion. As the reports can/will be saved anyway… (And it’s exciting to see this one coming back!) Mainly needed for charts.

Bahbus
Participant V

I currently don’t have a useful implementation. But I would assume the following could be useful:

  • adjustable retention time (delete immediately all the way up to and including never delete)
  • some kind of easy and predictable name scheme (to help those that archive snapshots for a long time)

Hi @Joshua_Aldrich thank you for investigating.
I was very happy about the SCREENSHOT() function, until I saw that it’s not very stable.

My use cases:

  • Chart in E-Mail or PDF Template
  • Converting the first Page of a PDF to an image and store it (This is when you use column type FILE. You can upload a PDF. In the Deck view it would be nice to see the first page as an image. Just like a preview.)
  • Converting all pages of a PDF in separate images and store them (This would be for the use of XY Background image: One could upload a PDF with Floor plans. Then the App creates images. One image for page 1, another image for page 2, …)

I think @Rosemary_Black found a workaround. Maybe you want to consider.

Jonathon
Participant V

@Joshua_Aldrich

If you could render and snapshot SVG’s, the usecases would be pretty broad / exciting. Two big examples:

  • Dynamic images without requiring pre-made .jpgs for every scenario, including dynamic banners with text
  • Charts that go way beyond what AppSheet currently or ever will offer, such as very niche plots (i’m thinking from a material science / ASTM perspective)

If you are actively working on this, it shouldn’t be that difficult to render and snapshot an svg.

What I forgot to add:
I used SNAPSHOT() in one of my Apps that is Multilingual.
In the UserSettings I have a Dropdown where the User can choose his language. The Initial Value is selected by the USERLOCALE(). So if the USERLOCALE() is “en” then it will Localize the App in English.
Now most oft our Users are using German. But since the SNAPSHOT() function worked with an US system (I think), it opened the App in English and the Charts came out in English.
That would be something to consider like: Please respect the UserSettings before you Snapshot something

Our use case would be the same as most, snapshots of charts or tables to insert into reports. I wouldn’t think that they would need to be retained beyond the generation of the report.

Thanks all for the wonderful feedback! I think most of the interest falls in line with my expectations, but the svg support and pdf -> image are also interesting new ideas, which given the direction we are going with this may be possible long term once the basic functionality is done. Also, good point on the charting locales observing user locale, I’ll make sure that’s propagated to our template devs. I’ll keep you all posted as the work progresses and will let you know when the beta version is available so you can try it out.

Thanks again,
-Josh

@Joshua_Aldrich

Further thought regarding snapshot(), would it be possible to pass height and width parameters to have better control of the image size?

Particularly with SVG’s, as they scale losslessly, this wold be pretty valuable.

Top Labels in this Space