cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Error in custom script having 'If clause'

former_member91276
Active Participant
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

niconapo2
Explorer
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;
	}
}
former_member91276
Active Participant
0 Kudos

Thanks Nicolas,

I got my script working.it worked when changes done were as below

If( result = '0').

BR,

Plaban

former_member358098
Participant

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.

former_member91276
Active Participant
0 Kudos

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