Skip to content

Writeback and Actions: show writeback controls by user

4 min read · Updated 17 Nov 2026

This example builds an incident log in a workbook. When someone opens it, Actions read who is signed in, check that person against the people allowed to make changes, and show the Update and Approve buttons only to them. Those people can then edit an incident in a form and write the change back to the warehouse.

A video walkthrough of the finished workbook is on YouTube.

A Before workbook opens block runs before the workbook renders. In this example it sets two variables, User Name to the signed-in user’s name and Current Date to today’s date, and logs both. The values come from the Current User and Date & Time context values. Here the two variables are only logged; the update in step 5 reads the user and the date from the context values directly.

Before workbook opens action blocks that set User Name and Current Date, then log the user’s full name and today’s date.

An Enter block for the incident log sheet runs each time someone opens that sheet. It:

  • logs that the writeback authorization check is starting
  • calls the Check Authorization procedure (step 3)
  • sets the visibility of the buttons from the result

Log blocks write to the browser console, which helps when you debug the sequence. A procedure lets you run the same blocks from several places.

On Enter Sheets action blocks that log writeback authorization, run the Check Authorization procedure, and set button visibility.

The procedure compares the User Name variable with the user allowed to update incidents. On a match it shows a success toast and makes the Update and Approve buttons visible; otherwise it shows a warning toast and keeps them hidden. This example compares against a single approved name. In your own workbook, compare against the people who may edit, for example a table of approved users. To show or hide an object, use the Set … container block: choose the button in it, then its Visibility property.

Authorization Procedure: Check Authorization compares User Name to an approved user, then shows a success or warning toast and sets visibility.

Each of the Review, Update and Approve buttons has an On click action that switches between the active and inactive versions of the buttons, so the selected one stands out.

Button Actions: On click blocks for the Review, Update and Approve buttons that switch the active and inactive button visibility.

To update an incident, the user selects a row in the incident table, and its values fill an editable form. The Submit Form button’s On click action then:

  1. writes the form’s fields to the Incident Metrics Writeback table with a writeback block, together with Updated By (the user’s full name) and Updated At (today’s date and time), so each change records who made it and when
  2. shows a toast confirming the update
  3. refreshes the data so the table shows the change

Writeback Functionality: the Submit Form button’s On click action writes Incident Metrics Writeback fields, shows a toast and refreshes data.

The finished workbook, as seen by a user allowed to make changes:

Incident writeback dashboard for Randy Levine with Review, Update and Approve buttons above an Audit Log table of incident notes.