If the expression is valid, you will get a "Valid Expression" message at the bottom of the Editor.
If you plan on using a variable value in a text string, you must use quotes (") to surround the text string, and plus symbols (+) to join the Variable value with the string.
Example:
Text: 'My work order ID is: ' + @Table Record.Test WO Record.ID + 'and my badge ID is: ' + @App Info.Logged-in User.Badge Id
Common Use Cases Explained
Converting Text to a Number
To convert text to a number, you must first decide if you want the number to be a float (with decimal places) or an Integer.
Let's imagine that you want to convert text to a float. Here's how you might do that:
Since Tables require a text value for a unique ID, you will need to convert any numbers to text.
To do this, simply add an a set of quotes after the number using the "+" operator.
"Data Manipulation" "Store" data: "Expression"
123.456 + ""
Note - This must be two double quotes ("") or two single ('') quotes after the "+"
You can think of this as a "TOTEXT" Expression.
Modifying Barcode Scanner Output
First, you must figure out the format of the barcode scanner output. Let's assume that it is text, and you want to convert it to a number.
To do that, you must use TEXTTONUMBER() on the scanner output. It looks like this:
"Data Manipulation" "Store" data: "Expression"
TEXTTONUMBER(Device Output.data)
location: "work_order"
Creating a Comma-Separated List of Values
You can combine multiple strings or numbers into one string, with each value separated by a comma. You can add on to an existing field in a table, or simply combine multiple Variables or Static Values.
Here's how to combine the values stored in 2 variables into one text value:
"Data Manipulation" "Store" data: "Expression"
Variable.Defect Report-Defect Type + "," + Variable. Defect Report-Defect Description
Adding New Lines within Text
Let's say that you want to share the results of an app completion with a supervisor. You can do this by sending an email via a Trigger. You can add new lines to the email text by pressing SHIFT+ ENTER while typing within closed quotes in the Expression Editor. It will look like this:
Expression: 'This is line1 ' + 'This is line2 ' + 'This is line3'
You can also head to community.tulip.co to post your question or see if others have faced a similar question!
Expression
A configured code snippet that returns a calculated value based on certain inputs. Expressions have access to all of the variables, Table Records, and any other data available to an application.
Trigger
Triggers are the mechanism to do things in Tulip Apps. Store data, move users between Steps, Interface with hardware, Etc.
Triggers can be added to widgets, machines, devices, apps, and steps.
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.
App Info
App Info is a subset of the data available within an application automatically. This data can be used both in Widgets and Triggers. This includes the current date and time, the app name, the app version, the current shift, and more.
Variables
Variables are a location to store app information. Variables have a specific type that must match the contents they can store.
Variables are only accessible within a single application and are cleared when the app is restarted or completed.
Trigger
Triggers are the mechanism to do things in Tulip Apps. Store data, move users between Steps, Interface with hardware, Etc.
Triggers can be added to widgets, machines, devices, apps, and steps.
Number
Number is a Tulip Datatype. Numbers can be any positive or negative number. Numbers support decimals.
ex. -5, 15, 47, 155, 15.2, -12.73
Variable
Variables are a location to store app information. Variables have a specific type that must match the contents they can store.
Variables are only accessible within a single application and are cleared when the app is restarted or completed.
Expression
A configured code snippet that returns a calculated value based on certain inputs. Expressions have access to all of the variables, Table Records, and any other data available to an application.
Actions
Actions are different operations that can be executed in Triggers. Actions cannot move users to other apps, or other steps.
Many Actions can be added to a single Trigger.
ex. Store the value of variable x to table field y, Print app step, Adjust Edge device GPIO pin.
Expression
A configured code snippet that returns a calculated value based on certain inputs. Expressions have access to all of the variables, Table Records, and any other data available to an application.
Expression
A configured code snippet that returns a calculated value based on certain inputs. Expressions have access to all of the variables, Table Records, and any other data available to an application.
Variable
Variables are a location to store app information. Variables have a specific type that must match the contents they can store.
Variables are only accessible within a single application and are cleared when the app is restarted or completed.
Table Record Field
Table Record Fields are single columns within a Tulip Table.
Static Value
Static values are unchanging values that can be used within Triggers. Static values can be of any Variable type.
Variable
Variables are a location to store app information. Variables have a specific type that must match the contents they can store.
Variables are only accessible within a single application and are cleared when the app is restarted or completed.
Integer
Integers are a Tulip Datatype. Integers can have any whole number.
ex. -5, 15, 47, 155. NOT 15.2, -12.73
Number
Number is a Tulip Datatype. Numbers can be any positive or negative number. Numbers support decimals.
ex. -5, 15, 47, 155, 15.2, -12.73
Expression
A configured code snippet that returns a calculated value based on certain inputs. Expressions have access to all of the variables, Table Records, and any other data available to an application.
Variables
Variables are a location to store app information. Variables have a specific type that must match the contents they can store.
Variables are only accessible within a single application and are cleared when the app is restarted or completed.
Static Value
Static values are unchanging values that can be used within Triggers. Static values can be of any Variable type.
Trigger
Triggers are the mechanism to do things in Tulip Apps. Store data, move users between Steps, Interface with hardware, Etc.
Triggers can be added to widgets, machines, devices, apps, and steps.
Expression
A configured code snippet that returns a calculated value based on certain inputs. Expressions have access to all of the variables, Table Records, and any other data available to an application.
Was this article helpful?
Thank you for your feedback! Our team will get back to you