Create List in SharePoint 2013 Apps

When working with SharePoint 2013 Apps, we might need a List to store our data.

For example:

  • A Timesheet App requires a List
  • A Ticket Tracking App requires a List
In this article, I would like to show you how to create lists for apps.

Host Web and App Web

We need to keep in mind that:
  1. The Host Web is the web where our App is installed (example: http://hpvm.sharepoint.net)
  2. The App Web is the isolated site collection of corporate app catalogs (example: http://app-df9989b8b0ad44.sharepointapps.net)

 Host Web and App Web

The reason why an App Web is separated is due to security.

Please note that the App Web does not have a Site Settings option. In our case the List will be created in an App Web!

Creating List

Run Visual Studio 2012 and create a new App Project.

Create a new App Project

Choose the type of hosting as SharePoint-hosted.
 
hosting as SharePoint-hosted

Click the "Finish" button to continue.

From the Solution Explorer choose "Add New Item" > "List".
 
Choose List item

Choose the "Custom List" template.
 
Custom List template

Click the "Finish" button. In the List Designer that appears, you can create new fields, create views, change field properties and so on.
 
List Designer

Save changes and run the app.
 
Save changes

How to view the list

You can view the list using the direct URL of the list name.

http://appdomain/AppName/Lists/ListName/AllItems.aspx
 
view the list

This concludes our List creation for SharePoint 2013 App.
 
List creation for SharePoint

References

Host webs, app webs, and SharePoint components in SharePoint 2013

Summary

In this article we have explored how to create a List for an app. I believe this will be useful in real-life scenarios.
 

Up Next
    Ebook Download
    View all
    Learn
    View all