Create a Workflow App

Here, we will explain the steps to incorporate workflow actions into an app to achieve the following workflow functions.
  • Start circulation by specifying data
  • Execute circulation processes (application, approval, etc.)
As an example, we will add workflow functionality to the 'Personnel Transfer Request Form' app, which includes the 'Personnel Transfer Request Form' sheet and the 'personneltransferrequestform_header' table.
  • 'Personnel Transfer Request Form' Sheet

    ../../../../_images/img_01.en287.png
  • 'personneltransferrequestform_header' table that stores data from the 'Personnel Transfer Request Form' sheet

    ../../../../_images/img_02.en268.png
  • 'Initial display' action of the 'Personnel Transfer Request Form' sheet

    ../../../../_images/img_03.en221.png
  • 'Save' action corresponding to the 'Save' button on the 'Personnel Transfer Request Form' sheet

    ../../../../_images/img_04.en191.png

1. Start circulation by specifying data

Use the 'Start circulation of the following data in the circulation data[]' action to specify data and start the circulation.

Tip

When the circulation starts, a number (workflow number) is issued to identify the data in circulation.

Various workflow actions will search for the target data using this number and process accordingly.

  1. Open the 'Personnel Transfer Request Form' sheet of the 'Personnel Transfer Request Form' app.
  2. Click the 'Save' button and open the 'Save' action set.
  3. Incorporate the 'Start circulation of the following data in the circulation data[]' action into the 'Save' action set. Drop it after the 'Insert data to table[]' action.
../../../../_images/img_05.en169.png

Note

This position is used because it uses the value of the data ID (W3 cell) registered by the 'Insert data to table[]' action.

  1. Click the circulation data selection button and select 'Personnel Transfer Request Form'.
  2. In the data specification cell, select '=W3'.
  3. Check 'Set the issued workflow number to the following cell' and select W4 cell. This cell will be used for specifying the 'Workflow Number' in subsequent workflow actions.
../../../../_images/img_06.en134.png

Hint

Cells W3 and W4 are located at the following positions on the 'Personnel Transfer Request Form' sheet.

../../../../_images/img_07.en121.png

With the above steps, clicking the 'Save' button will register new data and start the circulation simultaneously.


Block Updates to Data in Circulation

Furthermore, set up actions in the 'Save' action set to prevent tampering with data during or after circulation.

Hint

Similar measures are necessary if there are other update processes, such as deletion.

  1. Prepare a cell W5 to save the 'Circulation status'.
../../../../_images/img_08.en114.png
  1. Drop the 'Get the circulation status of the following circulation data[]' action before the 'Update data in table []' action, and enter the following.

(The status of the circulation data corresponding to the workflow number in cell W4 is output to cell W5.)

../../../../_images/img_09.en97.png
  1. After action 2, drop and enter the following three actions from the 'Control' tab.
../../../../_images/img_10.en82.png

If the circulation status is not 'New', a message will be displayed and the process will be terminated.

Hint

'New' is the value in the initial settings. If you have changed the status settings in 'Set up the Circulation Process', please adjust accordingly.


2. Execute Circulation Process

  1. Create a 'Execute Circulation' button at any location on the 'Personnel Transfer Request Form' sheet.
../../../../_images/img_11.en74.png

Hint

If created by copying a button, please make sure the button ID (the second argument of the BUTTON function) is different from the original button.

If left the same, clicking it will execute the same action set as the original button you copied from.

  1. Click the 'Execute Circulation' button and create a new 'Execute Circulation' action set.
  2. Drop the 'Execute circulation process for the following circulation data' action, and enter as follows.
../../../../_images/img_12.en67.png

Hint

W4 is the address of the cell where the workflow number is entered.

With the above steps, clicking the 'Execute Circulation' button will allow the circulation process to be executed.

Next Step

This completes the setup. For basic usage, please refer to Execute a Workflow.