0

I got stuck with the problem of lookup workflow. I need to fill the SharePoint list based on the 2 variables introduced earlier to another list. After some searching lookup workflow seems to be the best option. The problem is that one of my variable is number and is in the column number but the other one is the name of the header. I mean I got sth like this :

enter image description here

I have never used SharePoint Designer before and right now I found the lookup workflow for just the problem with numbers. Is it possible to get the searched values on the basis I mentioned ?

Thanks in advance for any help and patience.

  • Let's call the list on the left "List1" and on the right "List2." You want to set either column xyz OR column yxz depending on the value of "Name" from "List1" where 1[Number from List1] = [Number from List1]1? Is that right? – Erin L Mar 21 '16 at 19:04
  • Yes, the column is set by the name from List1 and the particular value from that column by the number from List1. – EmJotPe Mar 21 '16 at 20:23
0

First get the value of the "Name" column where [List1:Number] equals [List2:Number]. Then write an if statement to figure out which column to set.

enter image description here

  • Ok, thank you. I will try it. Do I understand correctly that there is no concept like looping over columns headers and checking whether the particular one is right ? And I need to write exactly the number of if-statements that equals the number of elements that are compared ? – EmJotPe Mar 21 '16 at 20:46
  • You're correct, there are no for or while loops in Designer, and no way to dynamically select a column to update. – Erin L Mar 22 '16 at 13:05
  • Thank you very much :) This works fine but I thought about using javascript in order to obtain the same result. Is this possible in SP ? And if so where to start from ? – EmJotPe Mar 24 '16 at 6:46
  • I suppose it's possible, though I don't know where you'd want to put the javascript. Perhaps in the List 2 create form? JQuery and SPServices would be a good starting point. You'd have to use the GetListItems operation with a CAML query to look up your values, then the Update command to add the values to list 2. But honestly, I wouldn't do it this way unless I had more than 10 columns to populate. – Erin L Mar 24 '16 at 12:55
  • Ok thanks once again. I will give this a try as the values searched will be used for another search.In case of problems I will look for help here. Once again, thank you and Happy Easter! – EmJotPe Mar 26 '16 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.