---
title: "Widget triggers"
slug: "widget-triggers"
updated: 2022-09-30T19:08:43Z
published: 2022-09-30T19:08:43Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.tulip.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Widget triggers

**In this article, you will learn:**

- **What are Widget level Triggers?**
- **How can you use Widget Triggers?**
- **Example Widget Triggers usecases**

## What are Widget Triggers?

Widget Triggers are blocks of logic that are automatically run when users interact with Widgets.

Widget Triggers can streamline how your users interact with Tulip Player by removing the need for *Next* buttons.

## How to Use Widget Triggers

Widget triggers are available for all Input Widgets, and the Interactive Table Widget. In most cases, these Triggers run when the value of that input changes. So, when users toggle a checkbox, or select a value from a single select, their triggers will run.

### Text and Number Inputs

Text and Number inputs work slightly differently. Text and Number Inputs triggers fire when the [Enter] key is pressed.

          WARNING

          

In the case of the Text input Widget, users may need to enter multi-line values to enter content. These inputs will cause the Widget triggers to run, make sure this behavior is supported by your Widget Trigger logic.

### Interactive Table Widget

The Interactive Table Widget is incredibly powerful. When a row is selected, the row selected will be loaded into the Linked Placeholder (if a Linked Placeholder has been mapped). On top of loading the selected record into a Record Placeholder, a Trigger is also run when a Record is loaded.

## Example Trigger Usecases

### Text Inputs

*In my usecase I want users to enter an order number at the beginning of our application (to eventually process that order). Users will be manually entering this order number, but we have been having issues where users arent following the correct order number format.*

*My order numbers follow the pattern: **Order 1234-567** and I want to make sure users have entered this order correctly before allowing them to proceed. This behavior can be achieved with a Regular Expression (Regex), but we can leverage input triggers to do this validation automatically in the background, streamling the process for our users.*

*In this case, the correct regular expression is "Order: [0-9]{4}-[0-9]{3}". To check this automatically, I can add this Widget trigger.* ![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%2820%29.png)

### Interactive Table Widget

*When users select an order from our backlog of open orders, we need to set the status of that order to IN PROGRESS. This could be done with a normal button Trigger, but we can streamline the user experience by building this directly into the Widget.*

*Additionally, when users select an order, we will move users to the next step in our application, where users can act on that order*

![image.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/image%2822%29.png)

## Further Reading

- [**Working with Time in Triggers**](/r230/docs/how-to-run-date-and-time-calculations-in-apps)
- [**How to add a Regular Expression to a Trigger**](/r230/docs/how-to-add-a-regular-expression-to-a-trigger)
- [**How to use the Expression Editor**](/r230/docs/how-to-use-the-expression-editor-in-the-app-editor)

**Widget**

**Widgets**are the elements that make up a specific **App Step.**Widgets can display information to users, collect user input, or trigger app logic.

*Common widgets include: Interactive Tables, Number inputs, Machine attribute widgets, and more.*

**Trigger**

**Triggers** are groups of logic that are tied to an app event, such as step open, timer, widget interaction, etc. App builders can add triggers to **widgets**, **machines**, **devices**, **apps**, and **steps**.

**Triggers** can contain **actions**, **transitions**, and **conditions**.

**Widgets**

**Widgets**are the elements that make up a specific **App Step.**Widgets can display information to users, collect user input, or trigger app logic.

*Common widgets include: Interactive Tables, Number inputs, Machine attribute widgets, and more.*

**Tulip Player**

**Tulip Player** is the Windows/Mac executable program where users can run Tulip apps. Tulip player allows you to create a more seamless user experience by removing the need for a web browser and allows increased IT controls.

**Linked Placeholder**

**Linked Placeholder**are one of the**Side Pane**settings for the Interactive Table **Widget**and **Record** **History** Widget**.**This setting can be tied to a **Table Record Placeholder,**and when users select a row in the **Widget,**that record is loaded into the mapped **Record Placeholder.**

**Table Record Placeholder**

A **Table Record Placeholder** is a reference to a row in a **Tulip Table**. Table Records can be created either from the Table UI or from an App Trigger.

**Table Record**

A **Table Record** is a reference to a row in a **Tulip Table**. Table Records can be created either from the Table UI or from with an App Trigger.

To edit a record it must be loaded into a **Table Record Placeholder.**

**Trigger**

**Triggers** are groups of logic that are tied to an app event, such as step open, timer, widget interaction, etc. App builders can add triggers to **widgets**, **machines**, **devices**, **apps**, and **steps**.

**Triggers** can contain **actions**, **transitions**, and **conditions**.
