Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
In the below screenshot, I've got null values in variables as marked in the screenshot. Please anyone could say what I did wrong in the script?
A:
LOAD VarCustomer, IN, OUT
FROM
let noRows = NoOfRows('A');
TRACE '$(noRows)';
for i=1 to $(noRows)
TRACE '----------------------------------------------';
TRACE '$(i)';
let vVar= FieldValue('VarCustomer',$(i)) ;
let vOriginFormat = FieldValue('IN',$(i));
let vDestinationFormat = FieldValue('OUT',$(i));
TRACE '$(vVar)';
TRACE '$(vOriginFormat)';
TRACE '$(vDestinationFormat)';
next i
EXIT SCRIPT;
Use Peek()
A:
LOAD VarCustomer,
IN,
OUT
FROM [test2.xls]
(biff, embedded labels, table is Sheet1$);
let noRows = NoOfRows('A');
TRACE '$(noRows)';
for i=0 to $(noRows)-1
TRACE '----------------------------------------------';
TRACE '$(i)';
let vVar= Peek('VarCustomer',$(i)) ;
let vOriginFormat = Peek('IN',$(i));
let vDestinationFormat = Peek('OUT',$(i));
TRACE '$(vVar)';
TRACE '$(vOriginFormat)';
TRACE '$(vDestinationFormat)';
next i
EXIT SCRIPT;
May bebe for thatthat field index value you dont have data so then null produced. Check that.
Because IN has only one value HR, so FieldValue('IN', 2) and FieldValue('IN', 3) and FieldValue('IN', 4) are all null. Out has two values, so 3 and 4 are null... FieldValue looks at the distinct value within a field and that's why 2, 3, 4 for IN doesn't show anything
I want to show related value instead of null value means what I want to change in script
Use Peek()
A:
LOAD VarCustomer,
IN,
OUT
FROM [test2.xls]
(biff, embedded labels, table is Sheet1$);
let noRows = NoOfRows('A');
TRACE '$(noRows)';
for i=0 to $(noRows)-1
TRACE '----------------------------------------------';
TRACE '$(i)';
let vVar= Peek('VarCustomer',$(i)) ;
let vOriginFormat = Peek('IN',$(i));
let vDestinationFormat = Peek('OUT',$(i));
TRACE '$(vVar)';
TRACE '$(vOriginFormat)';
TRACE '$(vDestinationFormat)';
next i
EXIT SCRIPT;
Sunny,
Please find this attached QVW file. I'm having the same null values issue, but I've used Peek function only. Kindly help.