Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
SIrving1689772775
Contributor
Contributor

how to convert null to empty in globalmap.get

This should be an easy one for people here, I am just not experienced enough to figure this out.

When using tFTPPut to output a file I am calling the new name (String)globalMap.get("file_prefix") + (String)globalMap.get("file_name") + ".pgp" .

In some cases though file_prefix is null but in those cases the file name is actually being written as nullFileName.pgp . What function can I put around the first string portion to not make it put anything there as I thought it would. To be clear, it is putting the string "null" and this is a context variable that is left empty.

Labels (2)
1 Reply
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hello @Stuart Irving​ 

 

Try the following:

 

(((String)globalMap.get("file_prefix")) != null? ((String)globalMap.get("file_prefix")) : "REPLACEMENT") + (String)globalMap.get("file_name") + ".pgp"