none
Find unique names in two columns?

    Question

  • Hi all,

    Is there a way to find set of unique names between two columns (column 1 and 2) and populate the third column (column 3)with it. For eg.

    Column 1                                       Column 2                               Column 3 (Result)

    John; Jen; King; Kyle;                Jen; Jenny; Kyle;                John; Jen; Jenny; King; Kyle

    This is to get around the fact that I cannot perform lookup in a list depending on two columns using SPD workflow 2010.


    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

    Thursday, November 07, 2013 3:58 PM

Answers

All replies

  • Kapil,

    Your best bet here would be to use an Event Receiver that could populate column 3 when an item is added or edited.  This of course requires server side code, but the implementation would be very easy using LINQ and the Distinct method: http://msdn.microsoft.com/en-us/library/system.linq.enumerable.distinct(v=vs.110).aspx


    Brandon Atkinson
    Blog: http://brandonatkinson.blogspot.com

    • Marked as answer by K-Joshi Thursday, November 07, 2013 6:39 PM
    Thursday, November 07, 2013 4:29 PM
  • Thanks Brandon. I cannot use code in my environment so have figured out a different way. The columns that I was looking up, I have now concatenated the value of those and populated the name of the person against the concatenated value. So my workflow will look up the final combined value. Thanks for your input.

    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

    Thursday, November 07, 2013 6:39 PM