› Forums › vLooup for SharePoint › Using a lookup column with vLookup
- This topic has 3 replies, 2 voices, and was last updated 5 years, 8 months ago by Alexander Bautz.
June 30, 2017 at 15:58 #17110Malakye ShortParticipant
Alexander has been helping me with this issue but suggested I post it on here as well.
My client is wanting to set up a tab in DFFS on a list called Change Requests that contains both a lookup column as well as a vLookup list. The goal is for the lookup column to be used to pick the related requests from the Change Requests list and display them in the vLookup column.
The query in the backend DFFS under the vLookup tab will work and populate the vLookup list if all of the other items in the list have their lookup columns populated correctly. The query that works is: “lookupColumn CONTAINS [currentItem:Title]” where it checks to see if the lookup column of any other item contains the title of the current item. The problem is, every item in the list has to be updated manually instead of automatically from what I’ve been finding. If there’s a way to add the current title to the lookup column of each item that is in the current item’s lookup column, then that would solve the problem.
The alternative is to use the query to check and see if the title of any other item is contained in the current item’s lookup list. That query would look something like this: “Title IN [currentItem:lookupColumn]” where it checks to see if the title of any other item is in the lookupColumn of the current item. If there’s a way to do this, or something similar to this, it should solve the problem.
I’ve attached some screenshots to try and show what I’m trying to do.
June 30, 2017 at 18:57 #17120Alexander BautzKeymaster
You need to change the query like the attached image.
Let me know how this works out.
June 30, 2017 at 19:20 #17123Malakye ShortParticipant
After I swapped the lookup field to hold the ID instead of title, I started getting the same results as the first query I mentioned. It’s filling out the other item’s with the right data without having to go to each one and plug it in manually that is causing the problem. Either that or searching if a title or ID in a different item is in the current lookup list.
July 3, 2017 at 23:32 #17170Alexander BautzKeymaster
Sorry for the delay. You don’t need to change the “view field” in your lookup field to “ID” – the image I posted shows how the query is set up, and this will work by asking for all items where the ID of the “parent” is selected in the child, but you don’t need to show the ID in the column – it’a handled in the CAML query.
I’m sorry if I’m misunderstanding what you try to do, but let me know how this works out – and if you need more help please email me some screenshots of what you have now, and how you need it to work and I’ll see if I can be able to help you further.
- You must be logged in to reply to this topic.