Regular Expressions are a useful tool to create patterns that help match and locate text/strings stored in a database.

Regular Expression is commonly abbreviated as “regex” and is similar to expressions used in Microsoft Excel as well as that used in programming languages like Perl.  

To utilize the Regular Expression tool you will first have to create a variable.  Once created, you can easily add a Regular Expression as a condition in a trigger.

The following guide will help you create one in Tulip:

How to identify certain barcodes

1- Open a step within the desired app in the Tulip App Builder.

2- Select the Trigger by clicking on the plus icon under the “Step” tab in the Context Pane. 

3. Name the trigger by filling out the title at the top of the Trigger Editor.

4. Set the Event:

  • Select “device” in the drop down menu
  • Select “Barcode Scanner” in the second drop down menu
  • Select “this station” in the third drop down menu

5-Set a Condition:

  • Click the “Add New Condition” button on the right side of the window in the If section.
  • Select “Variable” in the drop down menu.
  • Select the variable you created in the drop down menu Eg. Assembly Barcode.
  • Select “Matches Regular Expression” in the drop down menu.
  • Select “Static value” in the drop down menu.
  • Select “text” in the drop down menu.
  • Type out the Regular Expression in the final box. Eg.[U]+[a-zA-Z0-9].{9}
  • This Expression looks for Barcodes that start with a capital ‘U’ and has nine additional characters in it.

6. Set an Action:

  • Click the “Add New Action” button on the right side of the window in the Then section.
  • Select “Go To Step” in the drop down menu.
  • Select the desired action in the drop down menu. Eg. Next.

Here's what the full Trigger looks like:

To learn more about how to use regex, here is a tool that we found helpful

In order to effectively use the link, please type a sentence/paragraph in the text box (2) and use the Expression Section (1) to define the conditions of your search.  

The Tools section (3) will explain the function of each command in your expression. The Cheatsheet and Community Tabs (4) are other useful tools to build better expressions.

Did this answer your question?