Snapshot and UserSettings

A Snapshot(View) expression is typically used when generating a workflow email with an attachment. The Snapshot(View) expression can be added to the attachment template to include an AppSheet chart, graph, or map in the workflow attachment. The resulting attachment is usually converted to PDF and attached to the workflow email.

 

Previously the Snapshot(View) function did not work correctly if it relied on User Settings. This problem could occur if:

  • The Slice data being displayed in the Snapshot relied on a Row Filter Condition that referenced UserSettings.
  • The table being used in the Snapshot included a security filter that referenced UserSettings.

The AppSheet server implements Snapshot(View) using the Google WRS service. For each Snapshot, our server invokes the WRS service passing it a Callback URL. WRS invokes the Callback URL to display the view. The Callback URL invokes our serverโ€™s StartController StartWithToken entry point which launches the app and displays the view. WRS captures the view in an image file which it returns to our server. Our server inserts the image in the workflow attachment.

The problem was occurring because the Callback URL mechanism did not transmit the User Settings when invoking the view. Therefore, the view was not being displayed correctly if it relies on these UserSettings values.

This problem has been corrected. The UserSettings are now being passed when the callback is invoked. 

This change is being rolled out gradually. If you wish to be included in the rollout, please respond to this post and provide your account id, or submit a problem report saying you want to be included in the rollout.

If your application uses Snapshot and UserSettings and relies on the old behavior, be aware that the behavior will change to begin honoring UserSettings. This will occur over the course of the next few weeks.

5 4 678
4 REPLIES 4

What I'm curious about is the way the usersettings are managed on server considering that those are device-specific.

Could you bring some info about it?

I mean, I don't expect it to have any info on the usersettings or does this mean that the usersettings of the current user that triggers the bot are the ones taken into account server-side?

The UserSettings reside on the client but they are passed to the server on every client to server request. For example, the UserSettings are passed on Add, Update, and Delete requests sent by the client to the server. This allows expressions that are evaluated on the server to utilize the UserSettings values when they are referenced in an expression such as a table security filter..

My change propagates the UserSettings values so they can be used by the Snapshot function. This requires passing the UserSettings from the server performing the Add or Update request to the server where the WRS invoked Callback URL is processed.

Uk
Silver 1
Silver 1

Thanks a bunch

The change to honor UserSettings in Snapshots is now full deployed to all users as of Tuesday April 12, 2022 at 7:30 AM Pacific Time.