0 Replies Latest reply on May 9, 2016 12:43 PM by Jason Tomlin

    How to concatenate unique values from multiple data card fields.

    Jason Tomlin

      I have a data card with multiple dropdowns where a user can select multiple color codes.  Each color code has a related filler that is used beforehand and it's possible that there could be duplicates in the list.  I'd like to take this information and concatenate the unique values into a single variable.

       

      For example, if the user selects the following from the dropdowns:  AAA, BBB, CCC, AAA, CCC.  I'd like the variable to return just "AAA; BBB; CCC".

       

      I have written an input formula that works to a point.  It compares the current variable with the previous ones and returns the value if it is unique.  However, with 10 variables, EPDM can't hand the data card save operation and crashes.  Any ideas on how to reduce this to a point that EPDM can handle it, or another way of accomplishing the same thing?

       

      Here's the formula:

      %SS-Finishing CC01%

      $Token(|; %SS-Finishing CC02%,$Add($Find(%SS-Finishing CC01%,%SS-Finishing CC02%),3),|)

      $Token(|; %SS-Finishing CC03%,$Add($Find(%SS-Finishing CC01%,%SS-Finishing CC03%),$Add($Find(%SS-Finishing CC02%,%SS-Finishing CC03%),4)),|)

      $Token(|; %SS-Finishing CC04%,$Add($Find(%SS-Finishing CC01%,%SS-Finishing CC04%),$Add($Find(%SS-Finishing CC02%,%SS-Finishing CC04%),$Add($Find(%SS-Finishing CC03%,%SS-Finishing CC04%),5))),|)

      $Token(|; %SS-Finishing CC05%,$Add($Find(%SS-Finishing CC01%,%SS-Finishing CC05%),$Add($Find(%SS-Finishing CC02%,%SS-Finishing CC05%),$Add($Find(%SS-Finishing CC03%,%SS-Finishing CC05%),$Add($Find(%SS-Finishing CC04%,%SS-Finishing CC05%),6))),|)

      $Token(|; %SS-Finishing CC06%,$Add($Find(%SS-Finishing CC01%,%SS-Finishing CC06%),$Add($Find(%SS-Finishing CC02%,%SS-Finishing CC06%),$Add($Find(%SS-Finishing CC03%,%SS-Finishing CC06%),$Add($Find(%SS-Finishing CC04%,%SS-Finishing CC06%),$Add($Find(%SS-Finishing CC05%,%SS-Finishing CC06%),7))))),|)

      $Token(|; %SS-Finishing CC07%,$Add($Find(%SS-Finishing CC01%,%SS-Finishing CC07%),$Add($Find(%SS-Finishing CC02%,%SS-Finishing CC07%),$Add($Find(%SS-Finishing CC03%,%SS-Finishing CC07%),$Add($Find(%SS-Finishing CC04%,%SS-Finishing CC07%),$Add($Find(%SS-Finishing CC05%,%SS-Finishing CC07%),$Add($Find(%SS-Finishing CC06%,%SS-Finishing CC07%),8)))))),|)

      $Token(|; %SS-Finishing CC08%,$Add($Find(%SS-Finishing CC01%,%SS-Finishing CC08%),$Add($Find(%SS-Finishing CC02%,%SS-Finishing CC08%),$Add($Find(%SS-Finishing CC03%,%SS-Finishing CC08%),$Add($Find(%SS-Finishing CC04%,%SS-Finishing CC08%),$Add($Find(%SS-Finishing CC05%,%SS-Finishing CC08%),$Add($Find(%SS-Finishing CC06%,%SS-Finishing CC08%),$Add($Find(%SS-Finishing CC07%,%SS-Finishing CC08%),9))))))),|)

      $Token(|; %SS-Finishing CC09%,$Add($Find(%SS-Finishing CC01%,%SS-Finishing CC09%),$Add($Find(%SS-Finishing CC02%,%SS-Finishing CC09%),$Add($Find(%SS-Finishing CC03%,%SS-Finishing CC09%),$Add($Find(%SS-Finishing CC04%,%SS-Finishing CC09%),$Add($Find(%SS-Finishing CC05%,%SS-Finishing CC09%),$Add($Find(%SS-Finishing CC06%,%SS-Finishing CC09%),$Add($Find(%SS-Finishing CC07%,%SS-Finishing CC09%),$Add($Find(%SS-Finishing CC08%,%SS-Finishing CC09%),10)))))))),|)

      $Token(|; %SS-Finishing CC10%,$Add($Find(%SS-Finishing CC01%,%SS-Finishing CC10%),$Add($Find(%SS-Finishing CC02%,%SS-Finishing CC10%),$Add($Find(%SS-Finishing CC03%,%SS-Finishing CC10%),$Add($Find(%SS-Finishing CC04%,%SS-Finishing CC10%),$Add($Find(%SS-Finishing CC05%,%SS-Finishing CC10%),$Add($Find(%SS-Finishing CC06%,%SS-Finishing CC10%),$Add($Find(%SS-Finishing CC07%,%SS-Finishing CC10%),$Add($Find(%SS-Finishing CC08%,%SS-Finishing CC10%),$Add($Find(%SS-Finishing CC09%,%SS-Finishing CC10%),11))))))))),|)