Table of Contents

Was this article helpful?

Field attributes and types

There are a number of things you need to understand about fields before creating your own table, and this article will cover field attributes and types. We will be showing screenshots from viewing a table so you can familiarize yourself with the icons and terminology used.

If you are wondering where to view and create tables, this is covered in greater detail in Creating Custom Apps.

For this article, we will use a fictional table which will hold data for pets.

Field Attributes

When you view a table, you will notice some icons beside the field names, and when you hover over the icons, it will inform you of the attribute.

Required fields

Let’s say you have a table that holds customer records. A required field is the field that must be filled out in order for the record to save to the table. While the specific fields may vary from table to table, any table can impose rules of this kind. For example, our pets table requires the Name field to have a value in it in order for the record to save. This makes logical sense because what would be the point in saving a customer with no name?

Unique fields

A unique field, on the other hand, refers to the value itself. Basically, a unique field is one whose value is different than any other value currently saved in that table. As mentioned before, the RecordID field is a unique field to uniquely identify the record. In our pets table, imagine there is a record for the pet "Fluffytron." If Fluffytron has a RecordID of 13, no other record in the pet table will have 13 as their RecordID.

Field Types

Fields will have a field type which will dictate the data it holds. This will effect:

how the data is entered into the field

how it will be displayed on a screen

how you can interact with it on the screen

It’s important to note that every field you use or create in Method will fall into one of these types, but don’t worry - they cover all the bases! The field types are:

text: holds alphanumeric text

decimal: holds a numerical value with decimal places

integer: a whole number that can be positive or negative value

Date/Time: holds the date and time in UTC format

dropdown: explained below

linked field: explained below

money: holds a numerical value to two decimale places

Yes/No: holds only one of two values: “true” or “false” answer (in programming language, this is called a Boolean value). For example, if you were a veterinarian and you wanted to keep track of which animals had been vaccinated, you could use a Yes/No field to denote “yes, this animal has its shots” or “no, it doesn’t”.

file: is used to store an external file within the table

picture: similar to the the file field type, this allows you to store an external image in the table (e.g. .jpg or .png)

Dropdown fields

You’re probably familiar with dropdown fields from other websites you’ve used in the past: the kind you click on and then choose from a pre-existing list that - well, drops down.

In Method, the list of items shown in a dropdown is stored in yet another table. When creating a dropdown field, you can choose to create a brand new table to hold custom data, or select an existing table

In our Pets example, there is a dropdown field which we named Owner: This "Owner" field actually pulls data from the existing Method table, Contacts. Pictured above is how the Owner field looks when viewing it in the table. It will indicate the table it is pulling data from (Contacts), and the field which will be used to uniquely identify each record (RecordID).

Linked fields

Okay, here’s where things get a little more complicated. A linked field is a field that displays the value of a field in another table which has been established via a dropdown. That sounds confusing, so let’s use another example to illustrate what we mean.

Our Pets table has a dropdown field that pulls from the Contacts table. Once a user has chosen a value within the dropdown field, wouldn't it be handy if we could have quick access to other information from that contact?

For example, if we have chosen Bob Crenshaw as the Owner, what if we also want to grab his email, or his phone number, or his address and place it in our Pets table?

Instead of copying and duplicating the information from the Contacts table, you can create a linked field which will return the information Contacts table.

In the above example, we have created three linked fields:

OwnerEmail: a linked field to the Email field in the Contacts table

OwnerName: a linked field to the Name field in the Contacts table

OwnerPhone: a linked to the Phone field in the Contacts table

You may be wondering why you need to create a linked field. One of the main reasons is displaying data in a grid. A grid can only show information from one table. If you were to display the pets table in a grid, what if you want to show the phone and email of the owner, which is taken from the Contacts grid?

By creating linked fields, you link the information in the Contacts table to the Pets table, and thus can display it in the grid!