10 Replies Latest reply: Sep 13, 2017 1:40 PM by Mike Grattan RSS

    Complicated situation for Lookup function

    Mike Grattan

      I have a table with item numbers, descriptions, and a attribute called Cartons to Pallet.  This attribute tells me how many cartons of a particular item number will fit on one pallet.  If an order has less than this number of cartons, then it is a "picked" item, meaning it had to be removed from a full pallet in order to fulfill the order.

       

      When identifying a picked item in an order I am using the Lookup function to set a flag for that item.  As of this moment, it is only checking to see if the number of cartons is less than the cartons to pallet attribute:

       

      If(UNITS < Lookup('CartonsToPallet','ItemNumber',ITEMNUM,'ItemDescriptions'),1,0) AS PickFlag

       

      I would also like to check if the number of cartons is greater than Cartons To Pallet but also divisible by a whole number.  For example, if Cartons To Pallet is 56, and the number of cartons on the order is equal to 56 * 2, or 56 * 3, or any other whole number then this would indicate that whole pallets of this item were loaded and the cartons did not need to be picked.