Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
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."

q1.PNG

Here's the scripting:

q2.PNG

Here's what ConcatKey =:

q3.PNG

2 Replies
m_woolf
Master II
Master II

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:

if(IsNum(ItemID))

Those IFs have only 1 parameter.

Not applicable
Author

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,

Scripting:

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

ConcatKey:

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