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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

UPCASE in tMap Error : Type mismatch: cannot convert from String to Boolean in tMap

Hello everyone,

 

I'm trying to use StringHandling.UPCASE() in tmap to convert the first letter in a sentence to Capital. So here is what I tried

 

First expression

StringHandling.UPCASE(Var.var1)

var1 is..... StringHandling.LEFT(row1.Design,1)

 

Second expression

StringHandling.UPCASE(StringHandling.LEFT(row1.Design,1))

 

Third expression

I even tried to upper case all the sentence (to check if it works) using StringHandling.UPCASE(row1.Design)

 

But in all three cases I get the same error again and again, am not sure what is wrong in my syntex...

 

Error: Type mismatch: cannot convert from String to Boolean in tMap

 

Thank you for your help,

srashad

Labels (2)
1 Reply
akumar2301
Specialist II
Specialist II

Do you have any Column as Boolean in Variable expression or Output Expression  window.

 

Check there if you are using String instead of Boolean.

 

Note that : "true"(String) is not equal to true (Boolean)

 

Also you could use simple expression like

 

row1.columnname == null ? "" : row1.columnname.substring(0, 1).toUpperCase() + row1.columnname.substring(1)