What are the Top 10 Most Common Triggers?
  • 02 May 2023
  • 8 Minutes to read
  • Contributors

What are the Top 10 Most Common Triggers?


Article Summary

Not sure where to get started with Triggers? Check out these common patterns.

This article will show you some examples of common ways to use Triggers in Tulip. This assumes you already have a solid understanding of what Triggers are and the role they play in frontline operations apps.

If not, we recommend taking a minute to review, "What are Triggers?"

You should also read the overview of Variables

Top 10 Triggers

Here are 10 examples of triggers that will give you some ideas on triggers you can use in your apps.

1. Save barcode and auto advance to the next Step

This is often used in the first step of an app beginning with work instructions or quality checks.

By starting the app with this step, you can associate additional information like quality inspection results with this barcode when an operator Completes the app.

WHEN

  • "Device" "Barcode Scanner" outputs at "this station"

THEN

  • "Data Manipulation" "Store" data: "Device output" "data" location: "barcode"
  • "Go To Step" "Next"

If your barcode is a number with more than 16 digits, you will need to save it as a text value in Tulip. Here's how to do that:

  • "Data Manipulation" "Store" data: "Expression" " @Device Output.data " '' " location: "variable" "work_order"

2. Check before Advancing Steps

In this trigger, the operator cannot continue onto the next step unless a condition is met.

In the example below, the only way the operator can advance is if the scanned barcode is 7 digits long.

If it is not, the app will stay on the same step and show an error message. This could be useful as a poka-yoke for the desired barcode. *For example, you could use it when a work order ID is always 7 digits but it's located next to other barcodes that are different lengths.  *

WHEN

  • "Device" "Barcode Scanner" outputs at "this station"

IF

  • "Device Output" "data" "Matches Regular Expression" "Static Value" "text" "^\d{7}$

THEN

  • "Data Manipulation" "Store" data: "device output" "data" location: "barcode"
  • "Go To Step" "Next"

ELSE

THEN

  • "Show Error" "Static Value" "text" (message)

3. Run Connector Function to an External Database

When an event occurs (button pressed, Step opened, barcode scanned, etc.) you can send data in the app to an external database using a connector function. Or, you can retrieve data from an external database with a connector function.

In the example below, the Order Details, such as a shipping address, are retrieved from an external database based on the Order Number that was scanned from the barcode scanner. Notice that the Trigger also auto-advances to the next step after the barcode is scanned.

WHEN

  • "Device" "Barcode Scanner" outputs at "this station"

THEN

  • "Run Connector Function" connector: "Example Database" "Order Lookup Multiline" barcode: "Device Output" "data" and save result as: "Variable" (your variable here)
  • "Go To Step" "Next"

4. Using a footpedal to advance to Next Step

The goal of Tulip is to seamlessly collect data behind the scenes of apps that currently exist.

Clicking a ‘Next Step’ button on a touchscreen is often cumbersome and adds time to an operator's workflow. Using a footpedal is a simple way to trigger an action in an app while keeping both hands free.

WHEN

  • "Device" "Footpedal" outputs at "this station"

THEN

  • "Go To Step" "Next"

5. Use Buttons to Navigate Steps

The App Editor has default buttons for Previous & Next, but you can create your own buttons that can prompt the user to navigate to any step in the app. For instance, you can name the button ‘Report Defect’ and then add a trigger to go to a specific step when it is pressed.

WHEN

  • "button is pressed"

THEN

  • "Go To Step" "Defect Report"

6. Use Buttons to Store Variables

Adding onto the Trigger shown in 5, you can store a Variable whenever the button is pressed. For example, the "num" variable will increment by 1 every time the button is pressed. You can later use this number in Analytics.

WHEN

  • "button is pressed"

THEN

  • "Data Manipulation" "Increment Value" value: "num" by: "Static Value" "integer" "1"
  • "Go To Step" "Report Weight Out of Range"

7. Send SMS Alert

A "request help" button is frequently used to give the operators a way to call for help to their supervisor or engineer with a click of a button.

Pro tip: Use the @ symbol to incorporate values of variables into the alert to give the person more information about what’s going on!

WHEN

  • "button is pressed"

THEN

  • "Send SMS" to (person name) message: "Static Value" "text" (your text here)

8. Send Email alerts

For alerts that don’t require immediate action, users can opt to send an email instead. See the modification below:

THEN

  • "Send Email" to (person name) message: "Static Value" "text" (your text here)

9. Turn on GPIO outputs from Tulip Edge Devices

You can use Triggers to set an output on a connected GPIO device.

In the example below, when the button is pressed to Report Defect, it also going to turn on the red light on the andon light to indicate there is an issue at the workstation. The red light is connected to pin 1.

WHEN

  • "button is pressed"

THEN

  • "Run Device Function" "GPIO" "Set Digital Output" at "this station" on pin: "Static Value" "integer" "1" to state: "Static Value" "boolean" "yes"
  • "Go To Step" "QA Form"

10. Trigger action based on GPIO pin up (e.g. break beam status change)

Tulip can also listen to GPIO signals and respond based on a change in state.

For example, let's say that a break bream is connected to the I/O Gateway and is used to control a conveyor belt. The steps can change automatically based on when a product passes through the beam.

WHEN

  • "device" "GPIO" outputs at "this station" with event: "Pin up"

IF

  • "Device Output" "pin" = "Static Value" "integer" "1"

THEN

  • "Go To Step" "Next"

Further Reading


Did you find what you were looking for?

You can also head to community.tulip.co to post your question or see if others have faced a similar question!


Was this article helpful?