Get the other values of Lookup List on the Add New Item Form....

I have two lists,  list A and list B
list B is having a lookup column of list A

List A is having column such as RoomName, Location and Capacity.

While creating a new item in list B, on the add new form when I select a value of lookup column I want to display the other columns of list A based on selection on the add new item form.

Suppose I select RoomName which is lookup column on the form then i want to display the Location and Capacity on the form based on RoomName.

May 26th, 2015 6:17am

Hi Tandel,

Per my understanding, you might want to display values of other columns of ListA based on the selected option of the Lookup column in the new form of ListB.

As there is no OOTB feature can meet this requirement, I suggest you create a custom solution by applying some custom HTML and JavaScript to the new form(NewForm.aspx).

With JavaScript, we can monitor the change event of the drop down menu and get the users selection, then query the ListA with the selection with the help of SharePoint JavaScript Client Object Model for the values of other columns of a specific item.

About how to get user selection of a Lookup field using JavaScript in new form:

https://social.msdn.microsoft.com/Forums/office/en-US/529ee28f-80bf-44a6-9cb4-392e74213076/how-to-get-value-from-lookup-field-on-onchange-event?forum=sharepointdevelopmentprevious

How to: Create, Update, and Delete List Items Using JavaScript

http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx  

Common Programming Tasks in the JavaScript Object Model

http://msdn.microsoft.com/en-us/library/office/hh185015(v=office.14).aspx

With the needed values retrieved, you can then generate custom HTML tag to display in the new form.

About how to generate HTML with JavaScript:

http://blog.schettino72.net/posts/javascript-html-generation.html

Adding JavaScript and CSS to SharePoint

http://techtrainingnotes.blogspot.com/2012/05/adding-javascript-and-css-to-sharepoint.html

Thanks
May 26th, 2015 10:28pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics