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:
- The Host Web is the web where our App is installed (example: http://hpvm.sharepoint.net)
- The App Web is the isolated site collection of corporate app catalogs (example: http://app-df9989b8b0ad44.sharepointapps.net)
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.
Choose the type of hosting as SharePoint-hosted.
Click the "Finish" button to continue.
From the Solution Explorer choose "Add New Item" > "List".
Choose the "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.
Save changes and run the app.
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
This concludes our List creation for SharePoint 2013 App.