Skip to Content

SQL Error in custom script having 'If clause'

HI All,

IDM 7.2 SP8

i get the below job log, when using a 'if clause', in a script(for extracting dispatcher status). Could you please suggest on the solution

script

call to the script is as below. It is a To ASCII file pass

Source of To ASCII file pass is:

Regards

Plaban

error.jpg (38.5 kB)
script.jpg (28.3 kB)
call-to-script.jpg (33.0 kB)
source.jpg (16.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Mar 12, 2019 at 06:22 AM

    Hi.

    Your source tab says that you always will get an actual number of status or null value.

    And in script you're trying to get property of that number. But Par is already is a number, that you require, you don't need additionally get property, which will never exist in this context.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 12, 2019 at 09:38 PM
    function test(Par) {
    	if (Par !== null && Par !== undefined && Par !== "null" && Par !== "") {
    		uError("STOP_DISPATCHER is null or empty");
    	} else if (Par === 0 || Par === "0") {
    		return "Up and running";
    	} else {
    		return Par;
    	}
    }
    
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 13, 2019 at 04:26 AM

    Hi Artem,

    Since I am beginning my programming skills, I was not aware of how values are passed.

    I removed get property, and got the value.

    Regards

    Plaban

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.