quick way to access splistitem in different list?

100 Views Asked by At

I have 2 lists: listA and listB

listA has 2 fields:

Title (text)
PortalID (text)

listB has 3 fields:

Title (text),
listAField(lookup to listA Title field)
UserID (text)

I have a UserID value and I need a quick way to get PortalID value.

Currently I'm using 2 SPQueries:

1.Gets listAField value
2.Gets PortalID value.

Is it possible to do everything using one lookup directly? or some other more efficient way ?

2

There are 2 best solutions below

0
Sebastian 506563 On

when you are making lookup you can check which fields from list A you want to come with title. Just check checkbox with field PortalID

0
Angelo Kee On

you can use SPServices for this, using cascading dropdowns, you can find more info here: http://www.sharepointkings.com/2010/09/sharepoint-cascading-drop-downs-using.html this saved my life a lot of times already.