1 Reply Latest reply: Oct 9, 2012 2:09 PM by Ron M-Oracle RSS

    Determine selected UOM on calculated extended attribute

      When calculating results based on values with different units of measure (UOM), how do I know the unit of measure that is set on a calculated numeric extended attribute? For example, getting the target values in inches, if I calculate volume as length * width * height will produce a value in cubic inches. If the extended attribute UOM is set to cubic feet, then I must covert the returned results from cubic inches to cubic feet. The question is, can I determine the unit of measure for the calculated numeric extended attribute within the calculation script so that I can calculate the value in the correct UOM, or must I use a custom calculation class?
        • 1. Re: Determine selected UOM on calculated extended attribute
          Ron M-Oracle
          The Calculated EA can only have one specified UOM, meaning if your calculated EA is Volume, you configure it with one specific UOM (eg, cubic feet). Therefore, your JScript can request EA values of the length, width, and height to be returned in the UOM you need (feet)

          var length @ GetCellInMyRowByColumnID('LENGTH').Value.GetNumericValue ('FT');
          var height @ GetCellInMyRowByColumnID('HEIGHT').Value.GetNumericValue ('FT');
          var width @ GetCellInMyRowByColumnID('WIDTH').Value.GetNumericValue ('FT');