12 Replies Latest reply: Jul 29, 2011 1:18 AM by Srinivasa Devadiga RSS

    ScriptErrorDetails

    Srinivasa Devadiga

      Hi,

       

      My script as  bellow..

      Test:
      LOAD
      @1,
           @2
      FROM
      U:\QlikView\Monitor Dashboard\Email Notification Test\Email test 0720\Email test 0721\test.txt.txt
      (txt, codepage is 1252, no labels, delimiter is '\t', msq);

      vErrorType=ScriptError;

      vErrordetail=ScriptErrorDetails;//Pls check latter for Value not assigning  properly


      vErrordetail=ScriptErrorList ;

       

       

       

       

       

       

       

       


      if ScriptErrorCount=0 then  //If Script Executed successfully!
      //set vError=0;

      Store Test into U:\QlikView\Monitor Dashboard\Email Notification Test\Email test 0720\Email test 0721\Error.qvd;

      ELSE //If Script not executed successfully!

       

      Set  vError=1;
      exit script;
      end if

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      Above script  im not able access this inside vb script  as ScriptErrorDetails value become null.. how i can store this value in variable so i can  call this in macro..

      Macro Vb script as bellow for call that Error

      Set vErrType=ActiveDocument.Variables("vErrordetail")

      Thanks in advance.

       

        • ScriptErrorDetails
          Kaushik Solanki

          Hi,

           

             ScriptErrorDetail itself is a variable so no need to create any seperate variable to store the error.

           

             to see the value of this variable

           

             Create a textbox and type =ScriptErrorDetail.

           

             So is there is any error while loading the script the description is stored in this variable.

           

          Regards,

          Kaushik Solanki

            • Re: ScriptErrorDetails
              Srinivasa Devadiga

              Hi Kaushik,

               

              Thaks for your reply. i

              agree with you but in my case i need to send error deatils in mail. so need to call ScriptErrorDetail vbscript..in Qv 10 im loosing value .. so i cant able call ScriptErrorDetail  inside vb script..

              well-come your any other suggestion.  thanks

                • ScriptErrorDetails
                  Kaushik Solanki

                  Hi,

                   

                     If you want to send mail when error occurs, you can try this.

                   

                     Create a alert, here give condition as if (ScriptErrorCount<> 0,1,0)

                   

                     This will trigger the mail when there is error.

                   

                     Configure the mail.

                   

                     in message you can write

                   

                     =ScriptErrorDetail

                   

                     For more info on alerts have a look at the help.

                   

                  Regards,

                  Kaushik Solanki

                    • Re: ScriptErrorDetails
                      Srinivasa Devadiga

                      hey thanks for your suggestion but i wantedcall this error in Vbscript .pls help me

                        • ScriptErrorDetails
                          Srinivasa Devadiga

                          can u able to run my scipt?

                            • ScriptErrorDetails
                              Kaushik Solanki

                              Hi,

                               

                                 First thing i want to tell you is that qlikview already said that its not fixed that always your macro will run.

                               

                                 So it is always recommended  to use the built in feature of qlikview.

                               

                                 For macro you said.

                               

                                 "Macro Vb script as bellow for call that Error"

                               

                                 What do you mean by this.

                               

                              Regards,

                              Kaushik Solanki

                                • ScriptErrorDetails
                                  Srinivasa Devadiga

                                  Hi Kaushik,

                                   

                                   

                                  Thanks for your valuable suggestion

                                   

                                  I mean  i have Etl Script as bellow

                                   

                                  Test:
                                  LOAD
                                  @1,
                                       @2
                                  FROM
                                  U:\QlikView\Monitor Dashboard\Email Notification Test\Email test 0720\Email test 0721\test.txt.txt
                                  (txt, codepage is 1252, no labels, delimiter is '\t', msq);

                                   

                                  vErrorType=ScriptError;

                                   

                                  vErrordetail=ScriptErrorDetails;//Pls check latter for Value not assigning  properly


                                  vErrordetail=ScriptErrorList ;

                                   

                                   

                                  if ScriptErrorCount=0 then  //If Script Executed successfully!
                                  //set vError=0;

                                  Store Test into U:\QlikView\Monitor Dashboard\Email Notification Test\Email test 0720\Email test 0721\Error.qvd;

                                  ELSE //If Script not executed successfully!

                                   

                                  Set  vError=1;
                                  exit script;
                                  end if

                                   

                                  =============================MACRO========

                                  in macro im calling  vErrordetail as bellow

                                   

                                  Set vErrDt=ActiveDocument.Variables("vErrordetail")

                                  'MsgBox(vErrDt)

                                  but vErrDt dint have any value as  i lost value of vErrordetail in Etlscript itslef

                                  i found reson that i had defined ScriptError and assigined to  vErrorType  vaiable after that lost.if its single variable vErrordetail it will store value.and i can call this in MACRO aslo.

                                  thank u