select max(op_number),material from material_inhouse group by material. i am returning op_number. in the expression i have varriable called max_op_no in which i am calling lookup. max_op_number is compared with op_no(column name) and if matched then set value as say 1 else 2.
when i run the workflow the value for else means 2 is inserted for the all records. means the value for max_op_no is not there. what should i do? so that my workflow will give proper output