Hi,
I want to populate a column called “First date” with the oldest date of all the rows with the same part number.
I have a table that has three columns: part number, PO date, First date. The table is sorted by part number.
I’m hoping someone can modify my code to make it work. I think I’m kind of close and this would really help me learn if I can follow the script.
SmPrt="False";
For(i=1,i<=nrows(),i+=1,
if(SmPrt="False",
FrstDt=PO date(i)
);
if(:Part number(i) == :part number(i-1),
SmPrt = "True", smPrt= "False"
);
if(SmPrt == "True",
if(:PO date(i)< :PO date(i-1),
FrstDt= :PO date(i)
)
);
if(smPrt = "False", :First date(i)=FrstDt);
);