Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

'If takes 2-3 parameters' issue in script

I have the following script error when reloading from one line reading "Error in expression: it takes 2-3 parameters."


Here's the scripting:


Here's what ConcatKey =:


2 Replies
Honored Contributor II

Re: 'If takes 2-3 parameters' issue in script

I would be easier to reply if yoour script was text and not a picture.

You have 2 IFs at the end of the expression. They say something like:


Those IFs have only 1 parameter.

Not applicable

Re: 'If takes 2-3 parameters' issue in script

I don't know how to get rid of them based on the scripting. Any idea?

Load error:

if(trim('01')='' or IsNull('01'), '*NONE', trim('01')) & '%' & if(trim(If(IsNum(ItemID))='' or IsNull(If(IsNum(ItemID)), '*NONE', trim(If(IsNum(ItemID))) as _ItemID,


$(ConcatKey('$(varCompanyID)', If(IsNum(ItemID), Num(ItemID,'##########"), ItemID))) as _ItemID,


ConcatKey = if(trim($1)='' or IsNull($1), '*NONE', trim($1)) & '%' & if(trim($2)='' or IsNull($2), '*NONE', trim($2));

Community Browser