Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have severals xml-files and want to load the files into Qlikview.
I attached an ex. file. Basicly the structure of the xml-files consist two parts 'hode' as main and 'info' as data of 'hode'.
My question is how to make a uniq key for info that belongs to hode
I have tried to make a combination
autonumber(field1 & '-' & field2 & '-' & field3 ..) as %key_xxx
But Qlikview reads just the first record in info table.
Please! somebody help me out of the problems
Thanks in advandce
Loi
Hi
Directory;
// Start of [test.xml] LOAD statements
info:
LOAD
AutoNumber([%Key_deler_046ECFD0142C0E2C]&"sum"&"feltkode") as MyKey,
feltkode,
sum,
[post/posttype] as posttype,
[post/nr] as nr,
[post/tall] as tall,
[post/notehenvisning] as notehenvisning,
[post/fritekst] as fritekst,
%Key_deler_046ECFD0142C0E2C // Key to parent table: deler
FROM [..\..\..\..\..\..\..\..\..\Documents\Downloads\test.xml] (XmlSimple, Table is [deler/del/info]);
hode:
LOAD
orgnr,
regnskapstype,
regnaar,
aarsregnskapstype,
oppstillingsplan_versjonsnr,
valutakode,
regnskap_dokumenttype,
startdato,
avslutningsdato,
mottakstype,
avviklingsregnskap,
feilvaloer,
journalnr,
orgform,
mor_i_konsern,
regler_smaa,
fravalg_revisjon,
utarbeidet_regnskapsforer,
bistand_regnskapsforer,
fleksible_poster,
%Key_deler_046ECFD0142C0E2C, // Key to parent table: deler
%Key_hode_E7726A61A54DF5A7 // Key for this table: deler/del/hode
FROM [..\..\..\..\..\..\..\..\..\Documents\Downloads\test.xml] (XmlSimple, Table is [deler/del/hode]);
deler:
LOAD ant_poster,
%Key_deler_046ECFD0142C0E2C // Key for this table: deler
FROM [..\..\..\..\..\..\..\..\..\Documents\Downloads\test.xml] (XmlSimple, Table is [deler]);
// End of [test.xml] LOAD statements
Hi FF,
Thanks for starting the discussion. The XML-wizard from Qlikview can not help me so much.
What I expect from the test-file is, when I select orgnr and regnskap_dokumenttype, It will show for ex. data below.
The fields orrgnr and regnkap_dokumenttype are in hode-element.
orgnr | regnskap_dokumenttype | feltkode | sum | Comment |
938389942 | RES | 72 | 11723617 | |
938389942 | RES | 81 | 0 | |
938389942 | RES | 82 | 1116578 | |
938389942 | RES | 146 | 2815233 | |
938389942 | RES | .. | etc | |
938389942 | RES | .. | etc | |
938389942 | RES | .. | etc | |
938389942 | RES | 36633 | 1913001 | Last element |
938389942 | BAL | 47 | 43904872 | |
938389942 | BAL | 80 | 845392 | |
938389942 | BAL | 85 | 4997078 | |
938389942 | BAL | 86 | 27730259 | |
938389942 | BAL | .. | etc | |
938389942 | BAL | .. | etc | |
938389942 | BAL | 29042 | 941320 | Last element |
I have made a key like this
AutoNumber('$(vInn_FilNavn)'& "[hode/orgnr]" &"[hode/aarsregnskapstype]" & "[hode/oppstillingsplan_versjonsnr]" & "[hode/regnskap_dokumenttype]" & "[info/feltkode]") as %key_line_start,
But it read just first element. That is problem.
Regards
/Loi
Hi there,
I have been trying various things in reading XML files over the years....
I assume you have to use the %Key_<XMLtable>_<HEXCODE> fields,
that Qlik Script Wizard for reading xml is creating (at least in Qlikview).
PS: But I didn't figure it out how the HEXCODE is actually generated, so I can create it without the wizard.
Anyone knows ?