Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am new to QlikView, so I apologize if the question has already been answered - I just haven't been able to find it.
I am creating a QlikView app that sits primarily on SharePoint 2013, and I want to figure out a way to dynamically determine which HTML table I have to extract list data from. I have an ODBC connection, but I've been loading most of the data via the web file wizard. What I am extracting always resides on the third to last table resident in the table selection box. I would like to streamline the application upkeep process as the number of potential tables will be slowly changing, and I don't want to have to rewire it every time a list object gets added.
I haven't found any recognizable (to me) reference lists which I can index or peek into, and I was hoping someone out there might have some more insight than me into the mechanics of the process so that I can establish a dynamic table anchor. (page two of web file load wizard)
Any help would be greatly appreciated.
Thank you,
Joe
To clarify, I understand that I could loop through the potential tables, but as the target table maintains a static position related to the final field value, I thought that an alternative method might be more efficient.
I have the same problem. I need to load last table in webpage. Did you manage to resolve this in other way than looping through all table and wait for "table not found" error in errormode?
I probably could have accomplished this more dynamically with a FOR loop but here's my approach. Changing the ErrorMode is a critical step since many of the tables in this load script don't actually exist.
SET ErrorMode = 0;//temporarily disable error handling (some of the below tables don't exist)
temp15: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @15);
temp16: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @16);
temp17: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @17);
temp18: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @18);
temp19: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @19);
temp20: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @20);
temp21: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @21);
temp22: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @22);
temp23: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @23);
temp24: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @24);
temp25: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @25);
temp26: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @26);
temp27: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @27);
temp28: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @28);
temp29: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @29);
temp30: NoConcatenate LOAD * FROM DH_wrt.html (html, codepage is 1252, embedded labels, table is @30);
//Checks if each table exists, then loads third prior table as WebTable
IF NoOfRows('temp30')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp27;
ELSEIF NoOfRows('temp29')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp26;
ELSEIF NoOfRows('temp28')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp25;
ELSEIF NoOfRows('temp27')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp24;
ELSEIF NoOfRows('temp26')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp23;
ELSEIF NoOfRows('temp25')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp22;
ELSEIF NoOfRows('temp24')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp21;
ELSEIF NoOfRows('temp23')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp20;
ELSEIF NoOfRows('temp22')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp19;
ELSEIF NoOfRows('temp21')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp18;
ELSEIF NoOfRows('temp20')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp17;
ELSEIF NoOfRows('temp19')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp16;
ELSEIF NoOfRows('temp18')<>NULL THEN
WebTable: NoConcatenate LOAD * Resident temp15;
ENDIF
//Drop all the temp tables
DROP TABLE temp15;
DROP TABLE temp16;
DROP TABLE temp17;
DROP TABLE temp18;
DROP TABLE temp19;
DROP TABLE temp20;
DROP TABLE temp21;
DROP TABLE temp22;
DROP TABLE temp23;
DROP TABLE temp24;
DROP TABLE temp25;
DROP TABLE temp26;
DROP TABLE temp27;
DROP TABLE temp28;
DROP TABLE temp29;
DROP TABLE temp30;
SET ErrorMode = 1;//turn error handling back on for the rest of your script