Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Execution of Script Failed with no reason

Hi guys,

I am adding another script tab in to my existing application to bring a new qvd in together with some new definition of a few fields and some conditions. After I hit "reload", it fetched everything and it looks good until it finished reloading and gave me an ambiguous error message saying:" Execution of script failed. Reload old data?"

I tested the new added script in a new application without the old script and it works fine. I tested the old scripts in the old application and they are good also...

Would you masters be able to find any possible reasons?

Thanks a lot,

Lynn

23 Replies
ToniKautto
Employee
Employee

Does the document script log end with a "Execution finished." line?

If this is the case, there is nothing wrong with the script syntax, but your additional script more likely results in a heavy synthetic key. If a synthetic key is to complex or heavy for QlikView to resolve, the reload can fail with an error message like the one you see.

A synthetic key is generated if two (or more) tables have more than one field in common. If you for example intended to auto-concatenate two table, but one has a misspelled field name the result will be a synthetic key.

Anonymous
Not applicable
Author

The document script log does end with an "Execution finished." line. I qualified * when I created the QVD file for the new table I loaded to the application. I don't think there would be any synthetic key...:(

Not applicable
Author

Thats ok I thought you were a developer. would it be ok to paste the script as a text file here.

Its extremely tough to debug without that.

A few more suggestions I can think of - After the old script try commenting out everything(the new script) and reload.

Then slowly try uncommenting the the new script step by step like one set of code at a time and see where exactly this error is happening.

How to use Trace:

Lets say you have a table like

Customers:

Load*

From Customers.qvd(qvd);

Let vCount = noofrows('Customers');

Trace 'No of records in Customer table is: $(vCount)' ;

You can do this before and after the table which will help you find out if the # of records is consistent or not.

Not applicable
Author

Is it possible to delete the qvd files and create them again?

After that you can try to run the script again. I had the same problem and it worked fine for me.

Anonymous
Not applicable
Author

I'd think it's a logical loop in the data model, but "qualify *" rules it out...

Can you create new qvw, copy the whole script, and try to reload?

julian_rodriguez
Partner - Specialist
Partner - Specialist

This error happens when there is logical error too. For example, an aggregation function like Sum(), Min(), Max(), without the Group by sentence.

Which special functions are you using?

Can you execute your scritpt step by step and see on which line is ending?... pherhaps you may share with us this single line...

Anonymous
Not applicable
Author

Hi Michael,

Thank you so much!! It successfully reloaded!! But does that mean I have to design the whole dashboard all over again?!

Would you guys be able to figure out what happened to my old application...? It makes me feel extremely insecure. It's like my work can be damaged at any time...:(

Anonymous
Not applicable
Author

Thanks, Toni.

I am a developer. But a dummy developer who just got started...

The # of records is consistent. I feel my original application was destroyed for some reason. I recreated another application, copied and pasted the entire script and it's successfully reloaded!

I really wanna know what happened to my old application. It should be damaged for a reason... 

Thanks again!

Lynn

Anonymous
Not applicable
Author

Well, you can copy/paste the front end, sheet by sheet.

The only part to re-create manually are the variables.  If there are many, create an input box with all variables in the broken app, and copy into the new one.  But variable definitions are not copied, sorry.

ToniKautto
Employee
Employee

QlikView Project (PRJ) folder is a easy way to export the QVW content to file and then recreate the content in a new QVW file. See "QlikView Project Folders" in reference manual. 

Variables and data are not part of the PRJ folder structure. Data will be restored once you reload the QVW, but variables you need to export and import through the script, to avoid a too painful manual work. See below for script examples on how to export and import the variables through your script.

STORE ALL VARIABLES INTO A QVD FILE

VariableNames:

LOAD Name AS VariableName

FROM [MyApplication-prj\AllProperties.xml] (XmlSimple, Table is [AllProperties/VariableProperties/VariableProperties]);

FOR i=0 TO NoOfRows('VariableNames')

   LET varName = Peek('VariableName', $(i), 'VariableNames');          

   LET varValue = $(varName);

         

   Variables:

   LOAD

      '$(varName)' AS VariableName,

      '$(varValue)' AS VariableValue

   AutoGenerate 1;                    

NEXT

STORE Variables INTO Variables.qvd (QVD);

DROP Tables VariableNames, Variables;



RESTORE ALL VARIABLES FROM A QVD FILE

Variables:

LOAD VariableName,

     VariableValue

FROM Variables.qvd (qvd);

FOR i=0 TO NoOfRows('Variables')

  LET vVar = Peek('VariableName', $(i), 'Variables');

  LET vVal = Peek('VariableValue', $(i), 'Variables');

  LET '$(vVar)' = '$(vVal)';

NEXT

DROP TABLE Variables;