Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to write a loop to print out each row of the field in a table to the log.
Thanks for the help.
The TRACE statement can write to the script log. You need to get your value of interest into a variable and then use the variable in a TRACE statement.
If you want to print the distinct values of a field (eg "Name"), you can do it like this:
For i = 1 to FieldValueCount('Name')
Let vName = FieldValue('Name', i);
TRACE $(vName);
Next i
If you want to print the value of a field "Name" for each row of a resident table (eg "Transactions") you can do so like this:
For i = 0 to NoOfRows('Transactions')-1
Let vName = Peek('Name', i, 'Transactions');
TRACE Row: $(i) Name: $(vName);
Next i
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
The TRACE statement can write to the script log. You need to get your value of interest into a variable and then use the variable in a TRACE statement.
If you want to print the distinct values of a field (eg "Name"), you can do it like this:
For i = 1 to FieldValueCount('Name')
Let vName = FieldValue('Name', i);
TRACE $(vName);
Next i
If you want to print the value of a field "Name" for each row of a resident table (eg "Transactions") you can do so like this:
For i = 0 to NoOfRows('Transactions')-1
Let vName = Peek('Name', i, 'Transactions');
TRACE Row: $(i) Name: $(vName);
Next i
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com