1 Reply Latest reply on May 12, 2012 11:44 AM by Sorbsbuster

    lookup values via script

    rounakjain

      Title

      lookup values via script

      Post

      i have one table (named "Price List") with fields:

      1. Item name

      2. Item size

      3. Item price

      Let us say i write a script:

      SET VARIABLE [$NAME; VALUE: "ELBOW"]

      SET VARIABLE [$SIZE; VALUE: "15"]

      I want to create a new variable and give it the value of price by looking up $NAME and $SIZE in the price list.

      kindly help with the code to write in the script

        • 1. Re: lookup values via script
          Sorbsbuster

          You could create two new fields and a self-relationship from the Price List to itself, defines as:

          gName = Name
          and
          gSize = Size.

          Set the gName to the Name you want (or let the user enter it), the same with gSize, then pick up the price from that relationship.  The fields don't have to appear on a layout if you are doing it by script.