Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jagjivvt
Creator
Creator

If / and in script not working

Hi Please help.

i am using multiple if / and in script and the result is not correct. see below

" if([Formula Code]= 'Entityonly' and Len_Correct_Site='N' and Len_Select_legal_Entity='N' and Len_WE='N', 'Hold' ,

      

       if([Formula Code]= 'EntityPO'  and Len_Latest_PO_Number2='N' and Len_Correct_Site='N' and Len_Select_legal_Entity='N' and Len_WE='N', 'Hold' ,

      

         if([Formula Code]= 'EntityWork' and Len_Correct_Site='N' and Len_Select_legal_Entity='N' and Len_WE='N' and Len_Worker='N', 'Hold' ,

       

          if([Formula Code]= 'IFS'  and Len_Correct_Site='N'  and [Len_IFS Business Unit]='N' and Len_WE='N', 'Hold' ,

        

          if([Formula Code]= 'SiteWE' and Len_Correct_Site='N'  and Len_WE='N', 'Hold' ,

        

          if([Formula Code]= 'Wname' and Len_Correct_Site='N'  and Len_WE='N' and Len_Worker='N', 'Hold' ,

        

          if(isnull([Formula Code])= -1, 'Hold' ,

       

          if([Formula Code]= 'Done on a different Report', 'Hold',

        

          'Release')))))))) as Action,"

thanks

vijay   

13 Replies
tamilarasu
Champion
Champion

Have a look at the attached file.

johnca
Specialist
Specialist

For starters, and based on the available data for EntityPO there is a 'Y' in the Len_Correct_Site field, among others. Hence the expression evaluates as false and returns 'Release'.

if([Formula Code]= 'EntityPO'  and Len_Latest_PO_Number2='N' and Len_Correct_Site='N' and Len_Select_legal_Entity='N' and Len_WE='N', 'Hold'


Perhaps another look at your logic for 'Hold' and 'Release'?

jagjivvt
Creator
Creator
Author

thanks, that worked perfectly

vijay    

jagjivvt
Creator
Creator
Author

thanks this worked perfectly