QlikView Scripting — Save 50%
Your comprehensive guide to scripting powerful QlikView applications with this book and ebook
This article is by Matt Floyd, author of the book QlikView Scripting. In this article we will learn about QlikView error messages displayed during the running of the script.
(For more resources related to this topic, see here.)
QlikView error messages displayed during the running of the script, during reload, or just after the script is run are key to understanding what errors are contained in your code. After an error is detected and the error dialog appears, review the error, and click on OK or Cancel on the Script Error dialog box. If you have the debugger open, click on Close, then click on Cancel on the Sheet Properties dialog. Re-enter the Script Editor and examine your script to fix the error. Errors can come up as a result of syntax, formula or expression errors, join errors, circular logic, or any number of issues in your script.
The following are a few common error messages you will encounter when developing your QlikView script. The first one, illustrated in the following screenshot, is the syntax error we received when running the code that missed a comma after Sales. This is a common syntax error. It's a little bit cryptic, but the error is contained in the code snippet that is displayed. The error dialog does not exactly tell you that it expected a comma in a certain place, but with practice, you will realize the error quickly.
The next error is a circular reference error. This error will be handled automatically by QlikView. You can choose to accept QlikView's fix of loosening one of the tables in the circular reference (view the data model in Table Viewer for more information on which table is loosened, or view the Document Properties dialog, Tables tab to find out which table is marked Loosely Coupled). Alternatively, you can choose another table to be loosely coupled in the Document Properties, Tables tab, or you can go back into the script and fix the circular reference with one of the methods.
The following screenshot is a warning/error dialog displayed when you have a circular reference in a script:
Another common issue is an unknown statement error that can be caused by an error in writing your script—missed commas, colons, semicolons, brackets, quotation marks, or an improperly written formula. In the case illustrated in the following screenshot, the error has encountered an unknown statement—namely, the Customers line that QlikView is attempting to interpret as Customers Load *…. The fix for this error is to add a colon after Customers in the following way: Customers:
There are instances when a load script will fail silently. Attempting to store a QVD or CSV to a file that is locked by another user viewing it is one such error. Another example is when you have two fields with the same name in your load statement. The debugger can help you find the script lines in which the silent error is present.
In this article we learned about QlikView error messages displayed during the script execution.
Resources for Article:
- Meet QlikView [Article]
- Introducing QlikView elements [Article]
- Linking Section Access to multiple dimensions [Article]
|Your comprehensive guide to scripting powerful QlikView applications with this book and ebook|
eBook Price: $20.99
Book Price: $34.99
About the Author :
Matt Floyd has worked in the software industry since 2000, and has held career titles ranging from Project Manager to Technical Writer to Business Intelligence analyst. His career has spanned many industries, including environmental, healthcare, pharmaceutical, and insurance.
Matt's hands-on experience with QlikView started in 2008 with documenting an OEM-healthcare-related QlikView application for several years. Since then, he has been a technical writer, implementation engineer, consultant, and developer on QlikView projects. His passion for QlikView stems from his fascination of discovery through data, and the art, science, and power of data visualization. He is the founder of the Atlanta QlikView User Group and lives with his family in metropolitan Atlanta. Matt can be followed on his blog where he covers mostly QlikView-related Business Intelligence topics at floydmatt.com.