In this article you will learn...
- How to add fields to individual users and operators
- How to update those fields from an app
Tulip users commonly want to see a live view of work in progress for each operator. Or, you may want to create a skills matrix that can be updated whenever an operator completes new training.
To do this, you can use "User Fields" in the Users page within Settings to create custom fields for all users, and then update them in real time from your apps.
Here's how to set up User Fields and update them in an app.
Creating User Fields
It's important to note that you will need a User level of Account Owner to create User Fields, as you'll need to be able to access your Settings.
To access your Settings, click on your icon in the top right, and select "Settings. Next, select "Users".
The Custom Fields has it's own tab within your Users List:
When you click the "Custom Fields" tab, all operators and administrators in your account will be automatically listed.
To create a new field for all users, select the "+" button and then choose a data type from the list under "Field type".
You can add or delete fields at any time from the down arrow next to each field.
Updating User Fields In Apps
You can use triggers within your apps to update user fields in real-time.
In the example below, you can update whether a person is trained to use a saw via "Data Manipulation":
- "Data Manipulation" "Store" data: "Static Value" "boolean" "yes" location: "Users" "Logged-In User" (field)
You can use the "Logged-In User" field under "Users" to reference the user that is logged in to the app.
In "If" statements", select "Users" from the dropdown to reference a specific field:
- "Users" "Logged-In User"...
Selecting A User In An Embedded Table
Let's say that you want to allow an operator to assign a task to a machine maintenance tech from a list of your machine technicians.
You will need to:
- Add a Record Placeholder for the user
- Add an Interactive Table to the Step
- Link the Record Placeholder to the Embedded Table
- Add a trigger that fires when any row in the Table is selected
Here's how to accomplish that.
For more detail, see this guide to the Embedded Table widget.
Record Placeholder for A User
Go to the "Records" tab on the left side of the App Builder and select "Add Record Placeholder". Then, choose "Users Table" from the dropdown list and name the placeholder where you will store the user and their fields.
Add Interactive Table to Step
Add an Interactive Table using the Widget Bar.
Link Record Placeholder to Table
Select the Interactive Table, and then choose the Users Table and the Record Placeholder to populate the list.
Add A Trigger
In the same Context Pane, add a trigger that fires when any row is selected.
Then, you can send an email to the user that you just selected, for example.
- A row is selected
- "Send Email" to: "Table Record" "Current User" "User" message: "Static Value"
Exporting User Records
You can manually export all user data to a CSV by pressing the "Download" symbol in the top right of the User Fields screen:
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!