In this post, we will discuss how we can add lookup field type column in the list using visual studio 2013 by autohosted apps in SharePoint 2013.
Also, you can check my previous posts on:
Follow the below steps:
1. Open Visual Studio, then Add New Project and then select “App for SharePoint 2013” as shown in the fig below:
2. Visual Studio will ask you for some details of your new application as shown in the fig below:
3. Below is your visual studio solution explorer now:
4. When settings are okay click Finish and see what Visual Studio generated for you. You have two projects – one for SharePoint app and the other for a web application that contains actual application logic and server-side code.
5. Now right click SharePoint apps and add a new item as a list.
6. Add two list like list1 and list2
7. Now by default in list Title column is already in the list1 and list2
8. Now select list2 and add one column1 and type is lookup.
9. Now select the column1 from list2 and go to properties
10. Here you find the Type, under this you add list1 and add show field as Title (Title is lookup field from list1). see as an image
11. Now you deploy the apps in your site and add an item in list1 and then go to list2 and you will able to see the lookup value to list2 as a column1 field.
I am Navneet Singh, Working at C3it software solutions pvt. ltd. in Pune. My core skills are SharePoint 2013, Office 365, SharePoint 2010, SharePoint Designer, SharePoint Designer Workflow, Nintex Workflow, Infopath, Webpart, CSOM/SSOM, Power-shell, C#, ASP.NET and SQL Server.
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.