irGerard

When creating columns you have the option to lookup and link information of that column to a list on that site. In my case i link person information to an appointment in a agenda. Now when i view the person item, theres a link to the appointment item.

Is this a oneway link or is it also possible in the view of the appointment to create a link back or does this need to be done manually

Gerard



Re: SharePoint - General Question and Answers and Discussion Lookup function backwards

Brian Abram

It would have to be done manually. An event handler to catch the assignment of the person and the appointment would be your best bet. You have to keep in mind of the relationships that you'll be creating, whether it's a one-to-one, one-to-many, many-to-one, or many-to-many relationship. You'll also need to know whether you can want to edit the people within the appointment, or if you can only edit the appointment when viewing person information.

Ultimately, it would be a significant programming exercise to get this accomplished, but it's certainly possible.





Re: SharePoint - General Question and Answers and Discussion Lookup function backwards

irGerard

So although sharepoint knows the way to the appointment, it doesn't know its way back

If create the link back programmatically i'll also need to take care when updating, deleting, etc. That looks like a lot of work...





Re: SharePoint - General Question and Answers and Discussion Lookup function backwards

Brian Abram

It seems like the best you can do is create a lookup field in the second list to refer back to the first list. When you do this, you'll have an additional option with (Count Related) listed. This will show how many items in the first list refer to the item in the second list.

In relational programming, you often don't want a table to " know its way back" because then you're creating a two way link that can lock you into some unexpected behavior.

But again, this seems that it can be done programmatically, but it'd be a bit of a exercise. Instead, see if you can create a feature that will create an ECB option in the second list's items that will refer back to the first list. You could also filter the first list based on the properties of the item in the second list.