Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Neha121
Contributor III
Contributor III

if condition not working in script

Hi,

  I want to define a flag with restriction --->  if( num("Claimant Age") <= 17,1,0). this works fine when I put this code in chart/Table however If I use the same code in script it doesn't work.. can anyone guide me what the problem might be..

Labels (4)
1 Solution

Accepted Solutions
Sayed_Mannan
Creator
Creator

Hi, Try this in script

 

if( Num#("Claimant Age") <= 17, 1, 0)

View solution in original post

2 Replies
Sayed_Mannan
Creator
Creator

Hi, Try this in script

 

if( Num#("Claimant Age") <= 17, 1, 0)

Vegar
MVP
MVP

If you still have trouble after @Sayed_Mannan 's suggested solution, then try addig trim(), I often found that function to be helpful in similar situations. 

if( Num#(trim("Claimant Age")) <= 17, 1, 0)