Home » Sharepoint

Auto Populating SharePoint List Columns based on value in one column

   I have a SharePoint List where I want to auto populate the value of some of the columns from another List based on a field "Title" which is primary & unique....
   I want to auto populate them when clicking "New Item"  and entering data... you put the "Title" value and it should match the Title value from another List and auto-populate some the columns...

   Please any idea would be highly appreciated....

Thanks in advance

9 Answers Found


Answer 2

Well, I was kinda confused in what SharePoint forum should i post, because the problem can be categorized in all 3 forums

Answer 3

NEVER NEVER post the same question to more than one forum. It wastes everyone's time.

I am now going to delete those other two threads.

(Thanks to pl7626 for pointing this out - I usually spot these !)


Answer 4


From your question, since you said the list  is unique and primary, so for sure there is no redundant data.
You may try to use work flow to fill up the columns  by using "update list item".

Create the workflow and match the value from the resource and bring the value to the list item you just created.

Hope this helps


Answer 5


I thing you can very easily achieve this using Infopath forms. In that you just need to create one data connection to that list  and you can get any column  values of that list in the Drop down list box. I dont know how much familier and comfortable you are with infopath forms but they are a nice option to your requirement.


Answer 6

Based on the title of this tread and the description, I'd say this is definitely not a workflow related question. What I understand from Ashish's description is that:

1. Users browse to the newForm.aspx page of list  A to enter new data to the list
2. Enter a value in the "Title" field
3. At this point, values of other fields should be populated automatically
   a. The values that will be populated, are coming from List B, where the "Title" fields from List B matches the value in the current list's (List A) "Title" field.

Ashish: Please advise if I've misunderstood what you are trying to do. You can only run workflows once you saved the data, not while you are in the process of doing that. There are different approaches to this.

I don't know all of your requirements, but I'd recommend you not to populate data from the other list. Because you'll end up having duplicate data in both lists and later you'll need a workflow to synchronize the data when List B changes as per the above example. What you can do is create a Lookup field/column in List A and connect it to List B. This will create a link to List B for each records in List A.

If you need to populate data from List B into List A, you'll need to use SharePoint web services. You can add javascript code to the newForm.aspx page

1. Add a "onchange" event handler to the "Title" field
2. Using javascript and web services, query List B and retrieve relevant information
3. Set the values of fields in the newForm.aspx page accordingly

I think there are several javascript libraries out there that you can use if you don't want to write your own code. Those libraries should at least help you with Step #2 above, which is the big chunk in this case.

I hope this helps. This thread should probably be in the "Design and Customization" forum. May be Mike can help moving it. At least that way, someone can advise you of a relevant javascript library. I don't know of one.


Answer 7

Hi Ginni!!
            Thanks for your idea.. I do have little bit knowledge about Infopath forms but haven't associated one with any List...
            Do you have any articles, tutorials or references from where I could learn about associating infopath with SharePoint List & creating data connection to other List


Answer 8


References below may take you through the basic steps to create a data connection and query data from a sharepoint  document library or list  via Office InfoPath.

As Pman suggested, web services and JavaScript is a good way to query other lists and fetch the data then populate your fields. Marc has a blog post for this, hope it can be helpful to you.

Best Regards.


Answer 9

I know this post is a bit old, but I just wanted to add this for anybody looking for an answer in the future.

I've been working on something similar to this where some of the fields are automatically populated based  on the user when they click "New Item".

I have found jQuery and a sharepoint  specific jQuery library called "SPServices" invaluable.

jQuery can be found here: http://jquery.com

SPServices can be found here: http://spservices.codeplex.com

What has been helpful for me is the "Cascading Dropdowns" feature as well as GetUserName which wouldn't be as appropriate here.

I've also had to do some more extensive javascript/jQuery coding to make it work, but that should get you started if your needs are similar to mine.



How can i hide columns and rows in SharePoint newform.aspx list based on salected item in dropdown column. Please provide example.




Hello! Hopefully a quick question for you gurus :)

So, I have two relevant fields in my InfoPath 2007 form: A drop-down list called Contact Name, and a text field called Contact Phone Number.  Contact Name is populated through a SharePoint Contacts List, retrieving their Full Name from that list.

What I'd love to have happen is, when the user selects a name from the Contact Name list, have the form auto-populate the Contact Phone Number based on the phone number of the selected name from the SharePoint Contacts List.

I tried to set a rule in Contact Name to, when the field is Not Blank, populate the Contact Phone Number with the phone number from the Contacts List, but all that does is populate the field with the top-most phone number, not the one matching the selected name.

Any way to do this more accurately, and preferably without custom code? (Client has an explicit requirement to not have any custom code on the form or its associated workflow)


Thank you so much!


Greetings MSDN  I'm a first time Sharepoint wannbe and I'm working a project when I need to bring in the big guns.  This is my first project so be gentle.

For starters I'm using MOSS 2007

Bottom line upfront - 

When agents enter a value from a lookup table I need it to display two values found in two fields related to the value from the lookup table.

Details -

The first list "ITEMS".  ITEMS is a database of all of the items in our inventory.  Of note it contains to fields Item Number (which is the serial number of the item) and Price (which is the price of the Item) Description (which is the description of the item)

The second list is "SALES".  SALES is a database where our agents can enter the Item number (pulled from the ITEMS list in the form of a lookup) and quantity.  What I need the SALES list to do is display the Price and Description which are part of the record related to the item number.

Thank you in advance



I've got an External List and I want to create a Site Column, which is Lookup to a column in my external list. If I tick any of the columns in 'Add a column to show each of these additional fields' and click OK i get the following error message:

[NullReferenceException: Object reference not set to an instance of an object.]
  Microsoft.SharePoint.SPBusinessDataField.IsInDefaultView() +58
  Microsoft.SharePoint.SPBusinessDataField.CreateSpFieldForBdcType(String bdcName, Boolean hidden, Boolean readOnly, Boolean idField, SPAddFieldOptions op) +809
  Microsoft.SharePoint.SPBusinessDataField.AddNeededSecondaryFields(String wssNames, String[] oldNames, String[] newNames, SPAddFieldOptions op) +315
  Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op) +240
  Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol) +759
  Microsoft.SharePoint.SPFieldCollection.Add(SPField field) +61
  Microsoft.SharePoint.ApplicationPages.FieldNewPage.Save() +513
  Microsoft.SharePoint.ApplicationPages.FieldNewPage.BtnOk_Click(Object sender, EventArgs e) +46
  System.Web.UI.WebControls.Button.OnClick(EventArgs e) +114
  System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +139
  System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +28
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2980

Is this a bug or (more likely) am I doing something wrong / missing the point?

Also, does anyone know if there will be support for mutlivalue lookups to external lists?


Hi ... As part of an assignment to provide a series of reports to a client (in Excel format), I want to also provide a set of Excel sheets providing detail data for the aggregate-based reports.

I populate a historical working table with a view of many tables pulled together that the subsequent series of report queries use. This table is quite wide (almost 100 columns) but indexed nicely to cover many types of queries.

I was wondering if there is a way (either native or 3rd party) to have the columns from this table "auto-populated" in the SSRS designer. Yeah, looking to save some time, but could use this technique in future assignments, if available.



I have a datagridview with some hidden columns.. DATE_ENTERED, USER_ENTERED.  Since these columns are not visible they cannot be edited.  After a row is added, I'd like to have these fields auto populated.  I'v tried experimenting with the Row Added event of the gridview but I'm not getting anywhere.  How can I do this?




I have designed a Quiz based on http://blogs.technet.com/b/brenclarke/archive/2009/04/14/creating-a-quiz-web-application-using-sharepoint-designer.aspx. In default.aspx where I have designed quiz list from where the users would attempt to take a quiz. My requirment is once the user has taken the quiz 'A' then he shouldn't get back to the same page and attempt to take the same quiz again. How should I do this. Present default.aspx page is displaying all the quiz list items. Quiz is designed in Quiz list, Questions are designed in Questions list, Answers are designed in Answers list and Iam taking report from answers list and putting the report in QuizReport list with Quiz name, username and no. of correct answers. How do I filter with quiz name, username from QuizReport with Quiz name and logged in name in default.aspx page.


Thanks in advance.




Hi, I have two different SharePoint group named 'Sales' group and 'HR' group. In a SharePoint list i have 10 columns. out of it i want to display 8 column for 'Sales' group and to show all the column for 'HR' group. I want to do this base on the user login. How can i achieve this?. Am using SharePoint 2007.

One of the really interesting features in SharePoint is the ability to define a Site Column as a lookup to an existing list in SharePoint, effectively creating reusable relational structures throughout a site.

I have noticed, however, that there appear to be some limitations to the ways such data can be used in lists with standard SharePoint UI tools.

For example, given a SharePoint list where a Site Column is a lookup field to a SharePoint List, I have identified use cases where it would be preferable to have the Site Column look up from a List View and not the underlying list. I am wondering what people think the best ways to achieve this and how any referential integrity that may need to be enforced when linking a an Item from a View as a looked up field in another List. For example, a desired level of enforcement might be that we would disallow an item to be removed from a View when that Item is referenced in a List that has a column that looks up the same value from that View.

One might wonder, "why not just implement all of this in a database and surface the data to SharePoint?" In my view, one of the great things about leveraging SharePoint as a basis for a data solution that is in many ways equivalent to what could be achieved with programming against SQL directly is that SharePoint lists provide built-in version control that would be onerous to implement. Further, from a user perspective, such an approach minimizes the scope of what they have to learn to learn the system well. 

Another example is with Calculated Fields in a SharePoint List. Apparently, the SharePoint UI does not allow Calculated Fields to reference Site Columns in that List that look up values from another Sharepoint List. The lookup columns in this case simply do not show up in the field calculation UI. Does this mean such values are unreachable? Hence, my question to this forum, as I suspect there is a means to do exactly what I describe

If anyone has any ideas or code relating to these limitations with Site ColumnsViews and Calculated Fields, I would appreciate the input.


In a SharePoint list i am trying to use unique constraint for a "User" column of a list which having "Peoples and Groups" datatype. Please give me solution if anybody....


Hi there,

I wanted to know if it is OOTB functionality to configure a sharepoint list to be able to recieve files (maybe xml? we have a selection of file types to choose from and will go with whatever works best with sharepoint), via an email to the list and have the file metadata populate the list so we can create a workflow from here.

We want to use this to enable us to create work orders for our customer, we will be emailing alerts to sharepoint and then want a nice looking list(if list is the best option?) to then fire a workflow an be sent to our customer who can then do the required work and finally close out the task.

Any input / ideas on how to make this solution work would be greatly appreciated. We shouldn't have an issue with the custom workflows its just getting the info from the emailed file to populate the list that we could do with a bit more knowledge on.

Thanks for any help in advance =]



In my form I have a table with 4 columns, the column headers are: Code, Item, Unit, Cap.  I have a SharePoint list which contains all the data with the same 4 columns.  I would like to be able to have the Code field as a drop down list in my form that looks up all Codes in the SharePoint list and once I choose a code, the other 3 fields get automatically populated with the appropriate data for that code. 

I have the drop down list working, it finds all the data from the SharePoint list, I just can't make it populate the other 3 fields.  How do I do that?



I am 2 List in Sharepoint 2007 in which it consists of 1st list consits of ResourceName,Status and Status is a Choice Type Which consists of Bo,BB,P,B

AND 2nd List Consists of columns ResouceName,Business Unit and Business Unit is Choice Type which consists of Partner,Non-Partner,QUR

and if i select 1st List "Status" Value to BB then 2nd List Business Unit must get changed to QUR

How can i do this in Workflow

Thank You


 I need to make a link for all the rows in one column of a gridview(VB .Net) where the grid has been auto-created from the data source. The link would simply point to another ASP details web page. The examples I have found have all been in C# and I don't quite follow them.




I would like to know if I can create a drop down list that references two columns but when you click on the item in the column one, only the matching data in column two populates the active cell e.g. I have a list of program codes that have program descriptions. People entering the data will look at a drop down of the program description (text) in col 1, click on it but the adjacent code (number) in col 2 is what will show up in the active cell. I do not want the program description to be recorded - it's the aid that lets people enter the correct code. 
What I am working with is an Excel workbook where the first sheet is the data entry and subsequent sheets house the pick lists for drop downs on the first sheet. I am used to working in Access where this is an easy thing to do but Excel?!!!! I do not have  lot of VB experience and have only customized code a wee bit.



I have an infopath form in my document library and I have list with columns Service ID and Service Name.

Base on the service id i need to generate another request id for the form starting from 0 for each service id as follows.

service 1---Id-1)Request form          

            ----Id-2)Request form  


service 2---Id-1)Request form

            ----Id-2)Request form  

Any little help would be much appreciated.




I would like to populate the values of a choice column based on the value of another column. Is there a way to use the Choice and IF functions to populate the choice column? Here is what I am try to do:

IF ( Freelance_Column = TEMP ) THEN Populate the Choice Column called Type with list of values from the FLSA Choice column

ELSIF ( Freelance_Column = Contractor ) THEN Poplulate the Choice column called Type with list of values from the Contractor column.




I want to insert a table in to my infopath form that users can add / remove rows to when completing the form, so I believe this is a repeating table.

I then want to create a connection to a SharePoint list, holding data that will populate the table. Basically the table has a managers name, which links to one value which then has 8-15 options depending on the managers name, so essentially

Manager -> Cost Centre -> Sub Cost Centre 1
Manager -> Cost Centre -> Sub Cost Centre 2
Manager -> Cost Centre -> Sub Cost Centre 3

etc etc

What would be the best way to go about this? Thanks for your help!



I have a table in SQL Server2008.

I have a number of columns with datatype bit.

I want to return only those columns whose value is 1.

How do I do this?

I tried the below but it returns all columns...

				WHEN ReportA = 1 THEN 'ReportA'
				WHEN ReportB = 1 THEN 'ReportB'
				WHEN ReportC = 1 THEN 'ReportC'
	FROM OutputData


I have a Document Library to which I have added a Calculated Column. I would like to apply formula based on Name Column. How do I do that ?

For example, one value for the Name column data is "2008ProgramPlan1.docx" and I want the calculated column to get the value as "2008" (first four letters).


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure