New discussion topic on DataCleaner's online discussion forum 
(http://datacleaner.org/forum):

Mashud posted the subject 'Javascript transformer - total record count'

-------------------

Hi, 

I have 2 questions regarding javascript tranformer,

Question 1.
I am  trying iterate through each row in a column and get a total record count 
of Null values. Unfortunately it is not working and is giving me the count per 
record and not the totality of the column. I would appreciate if you could shed 
some light.

function eval() {

var array = [values[0]];
var cnt = 0;

for(var i = 0; i < array.length; i++)
        {
                if(array[i] == null)
                {
                cnt++;
                }
        }

return cnt;

}

eval();


Question 2.
Is it possible to get a total record count in javascript transformer? I am 
currently using the following code and it is giving me a value of 1 and not the 
total record count.

function eval() {

var array = [values[0]];

return array.length;

}

eval();


Thanks

-------------------

View the topic online to reply - go to 
http://datacleaner.org/topic/1074/Javascript-transformer---total-record-count

-- 
You received this message because you are subscribed to the Google Groups 
"DataCleaner-notify" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/datacleaner-notify.
For more options, visit https://groups.google.com/d/optout.

Reply via email to