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: 
yelin_nyu
Creator
Creator

if statement script error

I get an error msg from using script shown at bottom of this page --

Script line error:

IF 'tbl' <> ''

why?

SUB TraceRowCount (SourceTable)
IF '$(SourceTable)' <> ''
LET vNoOfRows = NoOfRows('$(SourceTable)');
TRACE >>> Number of rows in $(SourceTable): $(vNoOfRows);
LET vNoOfRows = Null();
ELSE
TRACE >>> No table name specified;
END IF
END SUB


tbl:
sql select * from Table123;

call TraceRowCount ('tbl');

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Syntax is like

if condition Then

<logic>

End if

so should be

IF '$(SourceTable)' <> '' THEN

View solution in original post

1 Reply
CELAMBARASAN
Partner - Champion
Partner - Champion

Syntax is like

if condition Then

<logic>

End if

so should be

IF '$(SourceTable)' <> '' THEN