Home » SharepointRSS

Auto Populating SharePoint List Columns based on value in one column

Hi!
   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 !)


(Moderator)
 

Answer 4

Hi,

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

Regards
Jason
 

Answer 5

Hi,

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.

Regards
Ginni
 

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

Thanks
 

Answer 8

Hi,

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.
http://office.microsoft.com/en-us/infopath/HP100931601033.aspx
http://www.codeproject.com/KB/sharepoint/InfopathSharePointList.aspx

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.
http://mdasblog.wordpress.com/2009/07/14/cascading-columns-in-a-sharepoint-form/


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.

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter