Hi Sing,
I think there are two issues in your Script,
1st: your if referenced the wrong list (Col_List)
2nd: the action is not inside your if statement, but after, so the if cannot control the action.
Try the attached script, it should do the job. In addition to Jim's script I added the modifications you may need.
Names Default To Here( 1 );
dt = New Table( "test",
New Column( "A::LotData", "Character", set values( {"", "YES", ""} ) ),
New Column( "B::LotData", "Character", set values( {"", "YES", ""} ) ),
New Column( "C::LotData", "Character", set values( {"", "YES", ""} ) ),
New Column( "D::Test", "Character", set values( {"", "Test", ""} ) ),
New Column( "value", set values( {1, 2, 3} ) )
);
colNameList = dt << get column names( string, character );
For( i = 1, i <= N Items( colNameList ), i++,
Try(
If( Contains( colNameList[i], "::LotData" ),
As Column( dt, colNameList[i] )[dt << get rows where( As Column( dt, colNameList[i] ) == "" )] = "REF"
),
)
);
Georg