Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

let and if statement

Hi, I have a 'status' variable which I derived and I want to include the status 'no job' in. And this status 'no job' is for when a variable 'time' is 0.0000. I've tried 'LET vNOJOB = 0.0000;' under a main tab in edit script and ' if((Time) = $(vNOJOB),'NO JOB' ' under another tab in edit script. However there's an error message saying ' if((Time) = $(vNOJOB),'NO JOB' ' statement takes 2-3 parameters.

Thanks.

5 Replies
Not applicable

Re: let and if statement

Hi Rachel,

I guess there should be two closing parenthesis after 'On Time', and you remove 2 after 'no job'.

As the error is describing, there's syntax error for if condition.

Re: let and if statement

Hi,

Check there is bracket need to be complete after 'On Time'

In that If statement you are taking 4 parameter.

Regards,

Regards,
Prashant Sangle
pradeepreddy
Valued Contributor II

Re: let and if statement

Check the syntax of the IF clauses carefully.... I think it will be a minute mistake when using Nested-IF...

pablo_ortiz
Contributor

Re: let and if statement

There is a syntax error, try this expression

=if(hora = $(vNOJOB),'NO JOB')

or

=if(hora = $(vNOJOB),'NO JOB','')

Not applicable

Re: let and if statement

Hi Rachel, on which place, you are using this condition ? it on LOAD or ?

Community Browser