Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have the issue, that reading through a table twice with "peek" doesn´t work with below code.
Mappings:
LOAD DestinationField,
[SourceFieldFileType_1],
[SourceFieldFileType_2]
FROM
[Data\Mapping.xlsx]
(ooxml, embedded labels, table is FieldMapping);
for y = 1 to 2
let vSourceColumnName = 'SourceFieldFileType_' & y
for x=0 to 73 // Set all "from-Fields" Typ y
let vmapfrom_$(x) = peek(vSourceColumnName,x,Mappings);
next x;
next y;
In first loop everthing is fine - contents of column1 of 74 records read.
In second loop - trying ti read contents of column2 of the same 74 records - I get NULL as result.
It is similar to (16.11.2011 jacq) (Peek funtion is not working...), but unfortunately that solution doesn´t help me.
Would be great, if someone has an idea.
Thanks, Klaus
Klaus
Mappings should be in quotes in the peek statement
peek(vSourceColumnName, x, 'Mappings');
That might resolve the second pass through the table correctly.
Regards
Jonathan
Klaus
Mappings should be in quotes in the peek statement
peek(vSourceColumnName, x, 'Mappings');
That might resolve the second pass through the table correctly.
Regards
Jonathan
Great - yes - thanks - it works -
Looks like QV´s support - letting it work in first time, although it´s a not set variable, while it just should be a fixed Value - confuses a QV beginner like me.
I agree - things could be a little more consistent...