What are Fields?
Knack uses objects and fields to structure your data.
Fields are used to define specific attributes of an object. You can think of a field like a spreadsheet column. You'll want to add a field for each attribute you want to store for your object.
Where do I access fields?
Fields are accessed from the "Data" section in the Builder, in the left column, by selecting the object where you want the field to be placed. The fields for that object are listed on the right, in the "Fields" tab:
Add a Field
To add a field, hover your mouse over a field Category (e.g. Text, Number, etc.) and select a field type. Click here for more on the different field types.
First, give your field a name.
Knack Tip: Keep in mind these names will be used to build your Live App, so we recommend keeping them reader-friendly. We also think it's important to give fields names that are very clear to the anyone with Builder access. Fields can always be renamed on views, but if the a builder is not 100% sure what a field is for, ic can cause confusion about its purpose.
Field types are grouped like so:
Text: Short Text, Paragraph Text, Rich Text, Text Formula
Number: Numbers, Equations, and Formulas
Choice: Multiple Choice and Yes/No
Date: Date/Time and Timer
File: Files of any type, Images
Personal: Name, Email, Address, Phone, Signature
Other: Link, Rating, Auto-Increment
Edit a Field
From the "Data" section in the Builder, select the object where you want to edit your field. To edit, click on the gear icon on the field.
This will bring you to the field options.
Convert the Field Type
It is possible to click on the field type text on the left and change (convert) the field type.
Warning: An update to the field type has the potential to update any existing records using that field, as Knack will attempt to convert any existing data when possible. Knack suggests testing this field type conversion on a copy of your app first.
For example, if you change a field’s type from from short text to link, Knack will use the short text for the URL component of the link field.
But if you change a field from paragraph text to a file, Knack has no way to migrate that data, so that field’s data will be cleared for each record.
Delete a Field
From the "Data" section in the Builder, select the object where you want to delete your field. To delete, click on the trash can icon. You will be asked to confirm before the field is deleted.
Warning: Any deleted field will be removed from the entire application; all data for that field will be deleted, and the field will no longer appear in any of your views.
Move a Field
Click and drag any field up and down to change the order it will appear in.
Copy a Field
Fields can be copied into new or existing objects using an object's copy option. Click here for more information.
Field Settings & Rules
Every field type has different settings options. Click here for more on the different field settings available.
Validation rules are used to prevent bad data input by your users. Read more about validation rules.
Conditional rules are used to set a field’s value based on values for other fields. Read more about conditional rules.
Use Fields in Your App
Fields can be used in a couple of different ways in your app.
Builder > Data Tab > Records
On the Builder Data tab, in the records view for an object, all fields and their associated values are displayed. See the Working with Records article for details on how to edit the field value in a record.
Live App > Views
For any view created based on an object, that object's fields are accessible within that view. See the About Views article for information on how to set up views to display your field's values. The Live App's display of your field's values is also addressed in that article.
Notes & Troubleshooting
Connection fields are a special field type and are detailed in our Connecting Objects Together article.
- Add Read-Only Fields to a Form
- How to Use URL Variables to Pre-Populate a Form
- Working with Fields