Discussion Board for collaboration on QlikView Scripting.
I need help in using ScriptErrorDetails.
I am using below code to fetch data from multiple excel files:
FROMZ:\files\*my_file*.xlsx(ooxml, embedded labels, table is Open);ErrorDetails:Load'$(ScriptErrorDetails)' as vScriptErrorDetailAutoGenerate(1);
After running this, i get following value in vScriptErrorDetail :
Field not found - <Emp-Id>
However there were 2 fields that were missing in different files:
Emp-Name column was missing in one and Emp-Id column in another.
But vScriptErrorDetail is storing only error in file read last.
I want vScriptErrorDetail to give following result:
Field not found - <Emp-Name>
If we have 2 or more field error during the reload, my purpose is to show my users that these are the fields causing the error. Hope I am making it clear for you to help.
Qlikview will stop executing the script on the first error unless you set the ErrorMode variable to 0 first.
SET ErrorMode = 0;
isn't it possible to store error in the main table ?
'$(ScriptErrorDetails)' as vScriptErrorDetail
FROMZ:\files\*my_file*.xlsx(ooxml, embedded labels, table is Open);
Hi christianj ,
This won't fetch the required info as vScriptErrorDetail will get null values.
This is because there aren't any rows being fetched from the file where columns are missing.
sure i read too fast
but you can add
ScriptErrorList which will give a detailled list of the errors and
ScriptErrorCount will gives the number of errors
it can help
ScriptErrorList gives the error 2 times for fields missing in 2 excel files:
Field Not Found
But it doesn't give complete info regarding error, like:
Field Not Found - <Emp-Name>
Field Not Found - <Emp-Id>
ScriptErrorDetail gives o/p as:
and not for both files.
Still not getting the required o/p