What are the Data Types used in Datasets?

Modified on Wed, 28 Aug at 10:32 AM

The Datasets feature is only available with the Droplet Package or as an add-on.

 In Droplet, datasets are essential for keeping your data organized, consistent, and ready to support the various forms and workflows your district relies on. Understanding the types of data you can store in these datasets is key to getting the most out of them.


In this guide, we’ll break down the different data types used in Droplet datasets and explain how they interact with your forms. Whether you’re just getting started or need a refresher, this article will help you manage your datasets with confidence.

Simple vs. Complex Data Types

Droplet datasets use two main categories of data types: Simple Data Types and Complex Data Types. Let’s dive into what each of these means and how they’re used.

Simple Data Types

Simple Data Types are straightforward and often serve as the building blocks for more complex datasets. Here’s a quick overview:

Text
Stores any textual information, such as names, email addresses, or descriptions. This data type is versatile and commonly used across various forms.

For example, you can store the name of a department head as a text item:

See the section below about Objects, which are often made up of text items. If a text item is used as part of an object, you will need to provide a Label for it, like "name" in the image above.
True/False
Also known as a boolean, this data type allows for two possible values—true or false. It’s handy for toggling options on or off based on specific conditions.


For example, if you have a dataset of locations — some of which may or may not require superintendent approval for certain requests.  You can use the data from this dataset to indicate which locations require this extra workflow step and which don't.


See the section below about Objects. If a true/false item is used as part of an object, you will need to provide a Label for it, like "needsSuperintendentApproval" in the image above.
Number
Used for storing numerical values. Whether it’s a quantity, ID number, or any other figure, this data type keeps your numbers in check.


See the section below about Objects. If a number item is used as part of an object, you will need to provide a Label for it, like "numberOfEmployees" in the image above.
Null
Represents a blank or empty value. Use this when a key has no associated value, which can be important in scenarios where some fields are optional.

For example, some locations have a list of budget codes they can reference in the form, while others don’t, so they don’t need to enter any codes. The form is designed to follow this logic: if a location has budget codes, users can select from the available options. If there are no budget codes for that location, the form will simply skip this section.

You can see that Central Office has three codes available for submitters to use. But, perhaps East Elementary School does not.You can replace that budgetCodesAvailable item with a null item, like this:

See the section below about Objects. If a null item is used as part of an object, you will need to provide a Label for it, like "budgetCodesAvailable" in the images above.
Complex Data Types

Complex Data Types combine simple data types to create more structured and detailed datasets. These types are particularly useful when your forms need to reference multiple pieces of related information:

Object
The most powerful data type in Droplet, objects consist of key-value pairs. Each key unlocks a specific piece of data, allowing for detailed and organized information storage. For instance, you could store an entire school’s contact information in an object, with each key (e.g., “principal,” “email”) paired with a corresponding value.

Every piece of data in an object needs a label, which you can think of as a key. Just like you need the right key to unlock a door, a form uses the correct label to access the data in an object.

For example, let’s say we have a dataset called ‘Administrators by Location’ with an Object data type. This dataset contains objects labeled with different locations. Each location object holds a Text data type with the name of the administrator.

The same label is used for the administrator’s name in each location, so when a form looks up the administrator for a specific location, it always pulls the right name.

You can reuse labels across different objects as long as they don’t appear in the same object. For instance, each location can have its own ‘administrator’ label, and the form will use the location label first, then the administrator label, to find the correct name.”

List
A sequence of items, much like a grocery list. Lists can include any data type and are often used when forms need to select or display multiple related values.

When a form references a list, it can either include all the items in the list or just select specific ones based on their order in the list. Unlike objects, lists don’t use labels to pull information. Instead, the form picks items based on their position in the list — for example, first, second, or third.

For example, here is a dataset called Locations made up of a list of text values:
How Data Types Work in Forms

Forms in Droplet interact with these data types by referencing the keys and values stored in your datasets. For example, if a form needs to find a principal’s email address, it would use the corresponding key in the object that stores this information.

Understanding how to structure your datasets using these data types will ensure your forms always pull the correct information, keeping your workflows smooth and efficient.


Tips for Managing Datatypes
Consistency is Key
When working with complex data types like objects, it’s crucial to maintain consistent naming for keys. This ensures that your forms continue to function correctly as you update or modify datasets.
Plan Your Data Structure
Before creating a dataset, think about the information your forms will need. Organize data into simple and complex types accordingly to make future updates easier.
Use Nulls Wisely
Incorporate null values where applicable to avoid unnecessary data clutter and to handle cases where certain information isn’t required.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article