Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to stop job execution if a parameter is null

Hello,
In my job I've a parameter to define the file name and pass it's value using the command line. But I need to check if the value passed isn't null and if it's null the job must stop it's execution.
How could I do that? I try to use tAssert but it didn't work.
Regards,
Felipe Cypriano
Labels (2)
4 Replies
Anonymous
Not applicable
Author

Can't you use
rightclick -> events -> execute if
and write your if statement?
Anonymous
Not applicable
Author

Thanks hammerwd,
I was using onSubjobOk with the tAssert, now I changed it to Run If and write the if condition - again - in the if.
Anonymous
Not applicable
Author

Now only one problem still there. How could I set an else statement? Because I need to return an error code when the if is false, the caller must know that the operation failed.
Anonymous
Not applicable
Author

Hmm .. I didn't do it before, but maybe you can use two if
first the valid:
if value != 0 and than do some jobs
and a second if:
if value == 0 than send mail or something like this.