Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

ScriptErrorDetails

Hi,

I try to manage error from my appli and I have a question for ScriptErrorDetails:

Why did he turn "NULL" after an error ?

Data:

LOAD * INLINE [

F1

A

B

C

];

LET NbRows=NoOfRows('Data');

STORE Datas Into (txt);

TEMP2:

                          First 1 LOAD

                          '$(NbRows)' as NB_ROWS,

                                    '$(ScriptErrorCount)' as ERROR_SEQ_NUMBER,

                                    '$(#ScriptError)' as ERROR_ID,

                                    '$(ScriptError)' as ERROR_NAME,

                                    '$(ScriptErrorDetails)' as ERROR_DETAIL,

                                    '$(ScriptErrorList)' as ERROR_LIST,

                                    now() as ERROR_DATE

                                    RESIDENT Data;    

                                   

STORE TEMP2 into ../DATA/TABLES/TEMP2.qvd(qvd);  

This way ScripErrorDetails will keep the Error and when the problem come from unnamed fields the error don't stay in ScripErrorDetails.

Regards

Tags (3)
1 Solution

Accepted Solutions
marcus_sommer
Not applicable

Re: ScriptErrorDetails

It's explained within the help by ERRORMODE that ScriptErrorDetails will be only filled by certain errors most from odbc-driver or databases.

- Marcus

4 Replies
Peter_Cammaert
Not applicable

Re: ScriptErrorDetails

This is tricky. You should remember that ScriptError-variables are reset when the next statement is executed.

On the other hand, what exactly should QV tell you about "unnamed fields"?

Peter

Not applicable

Re: ScriptErrorDetails

Thanks for your help.

I wanted to tell "field not found <A>" sorry.

Only ScriptErrorName and ScriptErrorDetails are empty, ScriptErrorList still have his error

Not applicable

Re: ScriptErrorDetails

Hi,

Someone know why ScriptErrorDetails get an error when this error is a "Table not found " and when it's "field not found <A>" ScriptErrorDetails get nothing.

These two parts have the same script:

FIRST 1 CONCATENATE(ERROR) LOAD
COUNTRY_CODE,
'$(NbRows)' as NB_ROWS,
'$(ScriptErrorCount)' as ERROR_SEQ_NUMBER,
'$(#ScriptError)' as ERROR_ID,
'$(ScriptError)' as ERROR_NAME,
'$(ScriptErrorDetails)' as ERROR_DETAIL,
'$(ScriptErrorList)' as ERROR_LIST,
now() as ERROR_DATE
resident DM_P2M_COUNTRY;

The only difference this script is under different script with an error I made:

First: "Table not found" - I store a table who doesn't exist

Second:  "field not found <AH>" - I changed a field who doesn't exist

Regards

marcus_sommer
Not applicable

Re: ScriptErrorDetails

It's explained within the help by ERRORMODE that ScriptErrorDetails will be only filled by certain errors most from odbc-driver or databases.

- Marcus