Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Want to read QVD no of rows and add for loop and read the values from that file/QVD
I have one QvdList.txt file like
QVDName|Flag
QVD12.qvd|1
QVD2.qvd|0
QVD3.qvd|1
QVDTest.qvd|0
want to count the no of rows and apply For loop till the count of Rows and print the values of Field1(QVDName) & Field2(Flag) in variables
I loaded this .txt file into qlikview and used below code to get the row counts from the table/file-
Let vCount = NoofRows(TablName/QvdName)-So in this case vCount will be 4.
So now how we can apply/add For loop till 4 and print the values ?
Thanks in advance!
try this
TableName:
LOAD * INLINE [
QVDName|Flag
QVD12.qvd|1
QVD2.qvd|0
QVD3.qvd|1
QVDTest.qvd|0
] (delimiter is '|')
;
Let vCount = NoofRows('TableName');
FOR i=0 TO vCount-1
trace $(i);
LET vQVDName = PEEK('QVDName', $(i), 'TableName');
LET vFlag = PEEK('Flag', $(i), 'TableName');TRACE vQVDName=$(vQVDName) vFlag=$(vFlag);
NEXT