Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikview Experts,
I am trying to load additional values to a set of fields using LOAD*INLINE; however, when I reload the script, although these values are appearing in the list, they are greyed out (even when selections/filters are cleared). Note that this document is doing a Binary Load from another Qlikview document. I have tried placing the LOAD*INLINE script on either documents but still getting the same result. I don't get any issues when I use LOAD*INLINE to add a new field that I associate to an existing field.
Any idea what could be causing this? I am stumped at the moment and have spent hours testing and figuring it out. This is happening even if I simply load one additional value for a single field.
FYI I am using LOAD*INLINE because I do not have access to the SQL tables where the original data is coming from.
If I understood correctly:
Table1:
LOAD ID,
Cost,
SomeOtherField1
FROM Table1;
Additionaldata1:
CONCATENATE (Table1)
LOAD [ID],
[Cost]
FROM
ADDITIONAL_DATA.xlsx
(ooxml, embedded labels, table is Sheet1);
Similar for the other table.
Hi,
Seems your script is wrong.
Use LOAD * INLINE instead of LOAD*INLINE.
For example:
Region:
LOAD * INLINE [
Region Code, Region
0, SPAIN
1, JAPAN
2, UK
3, GERMANY
4, USA
5, NORDIC
];
Mark,
could you elaborate a bit more detailed how your script and data model looks like? I assume you want to concatenate some data to an existing table?
If you see data in list boxes being greyed out, I assume there is still a selection made, potentially in a field with a hide prefix or system field, so it doesn't show up in current selection box. Maybe a field in a list box with 'always one selected value' option activated.
Hard to tell with the information provided.
Apologies if original post is vague. Anyway I was led to the right direction on looking for preconfigured or hidden selections. Was successfully able to load additional values for existing fields from a particular table. My next problem occurred when I did the same but for another table. To put very simply, I am trying to do something similar to this:
NOTE:
ID and Cost are two of the fields from an existing table.
ID and Loss are two of the fields from a second existing table.
Doing LOAD * INLINE worked to add this line:
ID | Cost |
---|---|
ABC | 500 |
Doing LOAD * INLINE for the below resulted in the message: "One or more loops have been detected in your database structure. Loops may cause ambiguous results and should therefore be avoided. QlikView will cut the loop(s) by setting one or more tables as loosely coupled. Settings for loosely coupled tables can be modified after script execution in the tables page of the document properties dialog."
ID | Loss |
---|---|
ABC | 10 |
I know the above is still vague. Technically the very simple example above works without issues, but as very hard to illustrate the whole actual script, the above is pretty much a good analogy of what I am trying to accomplish. Can anyone advise on why the "loop detected" error notification showed up? What is a good spot in the script I should double check?
Are you sure you really concatenated the INLINE tables to your existing tables? Have you used the CONCATENATE (Table) LOAD prefix?
Just realized I switched earlier to a LOAD...FROM script. Not using INLINE anymore.
So my script goes something like:
Additionaldata1:
LOAD [ID],
[Cost]
FROM
ADDITIONAL_DATA.xlsx
(ooxml, embedded labels, table is Sheet1);
//the above works without issues
Additionaldata2:
LOAD [ID],
[Loss]
FROM
ADDITIONAL_DATA2.xlsx
(ooxml, embedded labels, table is Sheet1);
//Inserting the above in the script returns the loop error
How do I incorporate CONCATENATE? I tried the below for the second script but still getting same error:
Additionaldata2:
Concatenate LOAD [ID],
[Loss]
FROM
ADDITIONAL_DATA2.xlsx
(ooxml, embedded labels, table is Sheet1);
If I understood correctly:
Table1:
LOAD ID,
Cost,
SomeOtherField1
FROM Table1;
Additionaldata1:
CONCATENATE (Table1)
LOAD [ID],
[Cost]
FROM
ADDITIONAL_DATA.xlsx
(ooxml, embedded labels, table is Sheet1);
Similar for the other table.
Problem solved! Thanks!
I am curious though as to when you should use CONCATENATE and why is it that on some of my much simpler documents, using either a simple LOAD (without a Concatenate Table prefix) or LOAD * INLINE would successfully add new values for existing fields (loaded from an earlier script) without getting that "loop detected" error.
QV will auto-concatenate tables with same number and names of fields.
You need to look into the table viewer CTRL-T to see if the tables are concatenated (resulting in one table) or linked (in your example, probably by ID field). If they are only linked, your setting will produce a closed loop (you can traverse from one table back to the same table by following links), which QV can't handle properly, hence the error.