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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
himanshup
Contributor III
Contributor III

Type mismatch: cannot convert from String to boolean

Version: 8

Build id: 20240524_0800-patch


Hi,

I have this expression in tMap.

/if the work email is null

row7.EMAIL==null

//or the work email is blank

||StringHandling.BTRIM(row7.EMAIL).isEmpty()==true

//then return empty string

?""

//else return the email string

:StringHandling.DOWNCASE(StringHandling.BTRIM(row7.EMAIL))

 

I am trying to replace the null vlaue to "" in the EMAIL field.

I am getting the error:

Type mismatch: cannot convert from String to boolean

The EMAIL columns is defines as varchar2(30) in Oracle (source).

 

Appreciate any suggestions.

Thank you

Labels (2)
2 Solutions

Accepted Solutions
Dave_Simo
Creator II
Creator II

Hello,

It should rather be put in the mapping of the EMAIL field than in the tMap filter, see screenshot below

Dave_Simo_0-1728494714883.png

Best Regards,

 

View solution in original post

himanshup
Contributor III
Contributor III
Author

True, Thank you.

 

View solution in original post

6 Replies
marksouzacosta

Hi @himanshup ,

What is your tMap field type? Can you please share screen shots with your Expression and tMap with all fields?

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Shicong_Hong
Employee
Employee

Hello 

I think the error occurs on this expression:

||StringHandling.BTRIM(row7.EMAIL).isEmpty()==true

try to change it to:

row7.EMAIL==null||row7.EMAIL.isEmpty()==true?"":StringHandling.DOWNCASE(StringHandling.BTRIM(row7.EMAIL))

himanshup
Contributor III
Contributor III
Author

Hi Mark,

here is the screen shot of the fields:

himanshup_0-1728485070879.png

 

himanshup
Contributor III
Contributor III
Author

Hello,

That change still gave the same error message.

row7.EMAIL==null||row7.EMAIL.isEmpty()==true?"":StringHandling.DOWNCASE(StringHandling.BTRIM(row7.EMAIL))

Thank you

Dave_Simo
Creator II
Creator II

Hello,

It should rather be put in the mapping of the EMAIL field than in the tMap filter, see screenshot below

Dave_Simo_0-1728494714883.png

Best Regards,

 

himanshup
Contributor III
Contributor III
Author

True, Thank you.