Question

I've two lists, one of persons, and one of addresses for theses persons (my purpose is that one person may have multiple adresses).

I'd like, when I add a person, to be able to directly add an address for this person I've just added. Without having to navigate to the Adress list and select the person in the lookup field for to add an address for this person.

Here are the models of my lists :

Persons

  • Last Name
  • Firstname

Addresses

  • Street & Number
  • City
  • Person (Lookup field)

Currently, I've added some JavaScript to create a button on the new person form which send the name of the person in the URL (?name=Rupert) to the new address form. But then my person isn't yet created because I change the page while editing the new person form.

Do somebody know if there is a way to achieve this easily such as a magic option to say "when I add a person, go to the new address form and select automatically the person which has just been added in the lookup field?

Thanks a lot for your help !

Was it helpful?

Solution

Parent/child relationships require the parent to exist before the child can be created.

This tutorial shows how to do it. The author has a few other techniques, involving javascript and/or SharePoint Designer.

OTHER TIPS

Why not only use on list, with Person as a User Field? Then you would be able to have all information you need in just on list, and extract it easily from the list.

(Works only if the persons are users of your site, otherwise you need a more graceful solution, involving a custom form page with code behind logic saving data to your two lists)

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top