4 Replies Latest reply: Jun 18, 2012 11:02 AM by Stefan Wühl RSS

    Script assistance

      Hi All,
      I'll appreciate your assistance on the issue I have as described below:


      Contains the first 4 columns - I would like to add a new filed (Potential_Left) with the calculated data  as shown below

       

      WarehouseProduct_PotentialWorkOrderProductionPotential_Left
      A5001150350
      A5002100

      250

      A500350200
      A50042000

       

      I'll appreciate your advise.

       

      Thanks
      David

        • Re: Script assistance
          Celambarasan Adhimulam

          Hi,

               Load

                    Warehouse,

                    Product_Potential,

                    WorkOrder,

                    Production,

                    Product_Potential - NumSum(Previous(Potential_Left), Production) AS Potential_Left

               FROM ...

           

           

          Celambarasan

          • Re: Script assistance
            Stefan Wühl

            David,

             

            I think it could look like

             

            LOAD

            ...

            if(isnull(peek(Potential_Left)),Product_Potential,peek(Potential_Left))-Production as Potential_Left,

            ...

            from Table;

             

            maybe including a check for Warehouse in the if() statement and using an appropriate order of your records.

             

            Regards,

            Stefan