Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I ran into an issue where I need to loop through a dataset and update some values. But I always get an error (undefined for) if I try to use the function "NoOfRows()" in a for-loop:
TableA:
Load
*
From $(PreloadPath)Customer.qvd](qvd);
ResultTable:
Load * Inline [
'A', 'B', 'C'
];
TableB:
For $i=1 to NoOfRows(TableA)
Concatenate(ResultTable)
Load * Inline [
'A', 'B', 'C'
'X', 'X', 'X'
];
Next;
If someone has an idea what I'm doing wrong, please reply 🙂
Missing quotes around table name. Try like: NoOfRows('TableA')
You should not use NoOfRows(TableA) in this case but NoOfRows('TableA') .
TableA:
Load
*
From
$(PreloadPath)Customer.qvd](qvd);
ResultTable:
Load *
Inline [
'A', 'B', 'C'
];
TableB:
For $i=1 to NoOfRows('TableA')
Concatenate(ResultTable)
Load *
Inline [
'A', 'B', 'C'
'X', 'X', 'X'
];
Next;
Read more on the function: NoOfRows - script and chart function
Missing quotes around table name. Try like: NoOfRows('TableA')
You should not use NoOfRows(TableA) in this case but NoOfRows('TableA') .
TableA:
Load
*
From
$(PreloadPath)Customer.qvd](qvd);
ResultTable:
Load *
Inline [
'A', 'B', 'C'
];
TableB:
For $i=1 to NoOfRows('TableA')
Concatenate(ResultTable)
Load *
Inline [
'A', 'B', 'C'
'X', 'X', 'X'
];
Next;
Read more on the function: NoOfRows - script and chart function
Great, thank you 🙂