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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Darmesh
Contributor III
Contributor III

Project scenarios

0683p000009LydD.png

 

Scenario 1 :

I have to insert comma in the values.

ex: 32825 o/p : 32,825

3281564 o/p : 3,281,564 

Before third digit i have to place comma.

 

Scenario 2 :

I have to replace the values -7.8 to (7.8)

need to replace open and close brackets for minus values.

Labels (2)
13 Replies
Darmesh
Contributor III
Contributor III
Author

it has null values.

 

error :

 java.lang.NullPointerException

manodwhb
Champion II
Champion II

this should fix for the null pointer exception row1.filed

 

if you still gets you have look for other columns may be causing null pointer exception.

 

 

!row1.filed.equals("") || row1.filed!=null||row1.filed.contains("-")?"("+row1.filed.replace("-","")+")": row1.filed

Darmesh
Contributor III
Contributor III
Author

still the same error.

But i want to load the null values into the excel without getting null exception error.

0683p000009LyHc.png

OR

Is there any other method to convert negative values to () brackets.

manodwhb
Champion II
Champion II

@Darmesh, i am able to get with below expresion. please check

 

(!row3.newColumn1.equals("") || row3.newColumn1!=null) &&row3.newColumn1.contains("-")?"("+row3.newColumn1.replace("-","")+")": row3.newColumn1