Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Jogi
Contributor III
Contributor III

Unknown statement: THEN SET

I have a problem with if condition: Unknown statement: THEN SET

 

 IF  (len(trim('$(Folder)'))>0) THEN 

            SET DirName = '$(VAlUE)\$(vFolder)\';
        
        ELSE
        
            SET DirName = '$(VAlUE)\EXTRACT\';

        ENDIF

 

 

Labels (1)
1 Solution

Accepted Solutions
martinpohl
Partner - Master
Partner - Master

Hi,

in an if statement in script, don't use ()

IF  len(trim('$(Folder)'))>0 THEN 

            SET DirName = '$(VAlUE)\$(vFolder)\';
        
        ELSE
        
            SET DirName = '$(VAlUE)\EXTRACT\';

        ENDIF

Regards

View solution in original post

2 Replies
_armoco_
Partner - Creator II
Partner - Creator II

 IF  (
   len(trim('$(Folder)'))>0,   //condition
   SET DirName = '$(VAlUE)\$(vFolder)\',  //then part
     SET DirName = '$(VAlUE)\EXTRACT\'; //else part
)//closing if

     
martinpohl
Partner - Master
Partner - Master

Hi,

in an if statement in script, don't use ()

IF  len(trim('$(Folder)'))>0 THEN 

            SET DirName = '$(VAlUE)\$(vFolder)\';
        
        ELSE
        
            SET DirName = '$(VAlUE)\EXTRACT\';

        ENDIF

Regards