Build and Load Instructions from a Table into an App

Build Table-Based Work/Process Instructions

Hi all,

I want to quickly show you how to build table-based process instructions for a variety of use cases including work instructions, audits, inspections, and more.

A table-based approach involves writing each task instruction as a record in a global table and using trigger logic to pull in the correct sets of instructions from that table. When process instructions are stored in a table, it is possible to pull sequences of tasks into any app and change those tasks quickly inside the table, rather than editing each app.

*While we do not recommend building wholly table-based work instructions applications, it can be extremely useful to selectively build common sets of instructions inside tables (such as safety checks), so you don’t need to edit each app when updates occur.


Step 1 - Build a Procedure and a Tasks Table

At minimum, you’ll need a Procedure table with an “ID” field. You’ll also need a Tasks table with an ID field, and Procedure ID field that matches the one in the Procedure Table, and a Task Sequence Field.

Example Procedure Table:


The Procedure table should contain a list of defined procedures

Example Tasks Table:


The Tasks table should include instruction text, guidance photos, CAD files, videos, etc.


Instructions are essentially a means to guide a user through a procedure, such as an assembly or an inspection. That procedure is made up of a series of tasks containing instructional content.
Let’s say the procedure is baking a cake. Task 1 might be: pour the flour. Task 2: mix in the sugar, etc.



Step 2 - Add Table Queries and Aggregations to “Get Tasks Associated with a Procedure”

1. Create a query named “Get Tasks Associated with Procedure ID” in the Tasks table.

2. Add two filters:

  • Procedure ID equals App Input (case sensitive) or Procedure ID contains App Input (not case sensitive).
  • Task Sequence Number equals App Input

3. Add a mode aggregation on the ID field named “Get Task ID” .

Query: In the first filter, the app input here refers to the operator selecting a procedure from an interactive table within the app. In the second filter, the app input refers to a variable we will create later on ("Current Task" - see: “Build Steps” lesson ahead).

Aggregation: The mode aggregation is used as a hack to import the table record into the app. We have already filtered the tasks by Procedure ID and Task Sequence Number, which returns a result of one record each time. Because there is only one record left after filtering, the mode aggregation will pull that record.


Step 3 - Add Table Queries and Aggregations to “Count the Number of Tasks in the Procedure”

1. Create a query named “Total Number of Tasks in the Procedure” in the Tasks table.

2. Add one filter to the query: Procedure ID equals App Input (case sensitive) or Procedure ID contains App Input (not case sensitive).

3. Add a Count aggregation named “Count Number of Tasks in Procedure.”

Query: This filters the tasks by the Procedure ID, resulting in a list of tasks associated with one particular procedure.

Aggregation: This counts the number of tasks found in the query result.


And that’s it! Now that you’ve built the minimum required fields in your tables, you can add more fields as needed.

To learn how to dynamically load these instructions from tables into an app, continue this lesson in Tulip University!


Community Button

2 Likes