A list is a simple structure for storing data. The design, or schema
, for a list is the set of fields (columns and types) which comprise the list. You can create a new list design by:
Once you have created a list, you can export the design as a set of fields that can be used like a template for designing another list
This example creates a Technicians
list via each method.
Create a New List
- Navigate to a folder containing a Lists web part.
- Click Manage Lists.
- On the Available Lists page, click Create New List.
- Name the list "Technicians"
- Use default settings for the Primary Key and the Primary Key Type.
- Do not select the Import From File checkbox this time.
- Leave the List Properties unchanged for this example.
- Use the Add Field button below the list of fields to add three custom fields to your list design, as shown in the screen capture below. The Key field is a built-in field. If you add an extraneous field, just click the "X" button to the left of the field row you would like to delete.
- The Name, Label and Type for the properties of the three new fields:
- Name: FirstName Label: First Name Type: String
- Name: LastName Label: Last Name Type: String
- Name: ID Label: ID Type: Integer
- Click Save.
Infer a Set of Fields
Instead of creating the list fields one-by-one you can infer the list design from the column headers of a data file. Either upload the file or cut/paste the contents.
- Click to download this file Technicians.xls.
- Reach the list designer as described above, but instead of clicking Add Field repeatedly, click Infer Fields From File once.
- Upload the sample file or paste the contents (tab delimited data) into the box.
- Click Submit.
- Note that the field names and types are inferred, but no data is imported from the spreadsheet used in this list design.
Note: Importing fields from a file will overwrite the existing list design, including deleting any data that has already been added to the list. Use only for new list creation.
Infer Fields and Populate a List from a File
If you want to both infer the fields to design the list and
populate the new list with the data from the spreadsheet, follow this shortcut process:
- Begin list creation as above, but this time click Import from File.
- Click Browse or Choose File and select the file you downloaded.
- You will see a preview of fields inferred - you may change types or labels here if needed.
Once you have saved a list design, whether or not you have added data to the actual list, you may export the fields to import into another newly created list.
- Click the name of the list in the Lists web part (here, Technicians).
- Click Design.
- Scroll down and click Export Fields.
- Copy the contents of the popup window to your browser clipboard or a notepad file.
Now you can use that schema as a template when creating a new list.
Once a list contains data, importing a new set of fields in this way will completely overwrite the list and cause any existing data to be deleted. This import option is intended for list creation, not for adding additional fields to a list
- In the Lists web part, click Manage Lists.
- Click Create New List, name it "TechniciansCopy" and leave other settings as defaults.
- In the List Fields section, click Import Fields.
- Paste the schema you exported above into the provided window:
- You could modify, add, or delete fields from the new design as needed.
- Click Save to save the new design.