$ 0 0 Hi, Try this: SELECT T0.[DocEntry] FROM ODRF T0 WHERE T0.[DocNum] =$[$7.0.0] and t0.objtype = 60 Thanks