4 Replies Latest reply: Feb 23, 2012 8:34 AM by Mohammed Mukram RSS

    Using a fieldname that has been created in the loadscript

      Hi All

       

      I have a simple script that loads some data from a resident table

       

      Instructions:

      load

           [ID] as [ID],

           [Name] as [Name],

           [Cost] * [Markup] * [VAT] as [Total Price]

          

      Resident DataLoad;

       

      Inside the script I want to interact with the [Total Price] field to determine some other calculations i.e.

      If ([Total Price] > 5000, 'Large Order', 'Small Order') as [Order Size]

       

      But since the [Total Price] field is being created in the script I can't access it, when I reference it as in the example above I get an error that [Total Price] can't be found

       

      In this example I could do something like:

      If ([Cost] * [Markup] * [VAT] > 5000, 'Large Order', 'Small Order') as [Order Size]

       

      but that seems redundant and in the scenarios I have the situation is considerably more complex than the example above

       

      Any help much appreciated.

       

      Thanks

      JP