There are a few problems with the script that are easily fixed.
1. The test portion of the for loop is wrong:
N Items( Numeric Columns ) <= 1
The number of Numeric columns doesn't change. If there are 0 or 1 numeric columns, the loop will run forever because 0<=1 and 1<=1. If there are at least 2 numeric columns, then the loop doesn't run at all because 2(or more)<=1 is always false. The test should be this:
i <= N Items( Numeric Columns )
That tests whether your iterator (i) is greater than the number of columns and stops when it is.
2. In a For Each Row loop, you still need to subscript into the row, you just don't have to manage the iteration yourself. So this piece:
Column(dt, Numeric Columns[i]) < 101
Should look like this:
Column(dt, Numeric Columns[i])[Row()] < 101
3. Your Count variable is a list, but you're treating it like a number. Count++ doesn't do anything to a list that isn't populated with numbers. Set Count = 0 instead of Count = {}. Additionally, Count++ returns the current value, and then sets Count to Count +1. So Count = Count++ will never change the value of Count. (Example: Count = 0. Count = Count++. Count is still equal to zero.)
Here is the full script with the changes above. The end Count is the number of cells in all numeric columns that are less than 101.
Names Default To Here( 1 );
dt = Current Data Table();
Clear Log();
// Get all of the numeric columns in the data table
Numeric Columns = dt << get column names( numeric, string );
NRows = N Rows( dt );
Count = 0;
//Column loop
For( i = 1, i <= N Items( Numeric Columns ), i++,
For Each Row(
dt,
If( Column(dt, Numeric Columns[i])[Row()] < 101,
Count++;
Show( Count );
)
)
);
HTH,
Melanie