3 Replies Latest reply: Feb 12, 2012 6:49 PM by Jason Michaelides RSS

    How to Script

      I am new to VB type script and I am not sure if this should be done with a case statement or an IF statewment, but I cant seem to get it to work either way.
      In the exmple below, I have an identical key for both lines but the condition field is different and so is the deal number.  I want to add a new field so that when these 2 conditions ZP06 and ZD05 exists for the same key, and their values are > 0 ,  I want the new field to have the Deal# in it that is related to the line with the ZP06 condition.
      example
      keyconditionvaluedeal
      9316789436/000010ZD0510067890
      9316789436/000010ZP0620012345
      Result
      keyconditionvaluedealnew field
      9316789436/000010ZD051006789012345
      9316789436/000010ZP0620012345

      12345


      Actually, better said, I only want to have 2 fields when I am done, the Key Field and the new field with the Deal# that relates to the ZP06 condition.  So, I would have a table like this,
      keynew field
      9316789436/000010

      12345

      Thanks, Sean