Qlikview-Components icon indicating copy to clipboard operation
Qlikview-Components copied to clipboard

Issue with using Qvc.ImportModel

Open AndrewGri opened this issue 2 years ago • 3 comments
trafficstars

Qlik Sense.

An application loads data using Qvc.ImportModel call. Previously model was exported by another ("Transform") application. At the first time data loaded successfully. But starting from the second attempt to execute load script the following error appears: "... The control statement is not correctly matched with its corresponding start statement...".

I found that error disappears after adding the following code after Qvc.ImportModel call:

Set _qvctemp.TableName = ; Set _qvctemp.FieldNames = ;

AndrewGri avatar Jan 12 '23 07:01 AndrewGri

Can you post your script please, including the CALL statements?

RobWunderlich avatar Feb 02 '23 18:02 RobWunderlich

Sure.

Here it is:


Table:
LOAD
	*
INLINE [
	ProductCode, Cost
    PR1, 100
];

CALL Qvc.ExportModel('lib://QS Models/model');

DROP TABLE Table;

CALL Qvc.ImportModel('lib://QS Models/model/QVC Check.qvd');

CALL Qvc.Cleanup;

For the first time everything is Ok, but starting from the second attempt the error message appears:

image

AndrewGri avatar Feb 05 '23 20:02 AndrewGri

I can also confirm that I have the exact same issue and when I set the variables prior to including the Qvc.qvs file the issue was resolved.

balexbyrd avatar Mar 02 '23 15:03 balexbyrd