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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to pass a String correctly

hi

how can i pass String in active express Builder ?

am doing like this

 

0683p000009LsNg.jpg

 

am not getting any output.

 

Labels (1)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Hi,

You are trying to filter a tMap output flow to keep only rows associated to the input flow "row1" for which DEVICEID is equal to "LAB0115AN3131 " (including the final space.

2 things:

- are you sure about the final space?

- most important, you should never compare 2 strings using the "==" operator but only the "equals" or "equalsIgnoreCase" method like this:

row1.DEVICEID.equals("LAB0115AN3131 ")

(or maybe without the final space).

Hope this help.

 

View solution in original post

25 Replies
TRF
Champion II
Champion II

Hi,

You are trying to filter a tMap output flow to keep only rows associated to the input flow "row1" for which DEVICEID is equal to "LAB0115AN3131 " (including the final space.

2 things:

- are you sure about the final space?

- most important, you should never compare 2 strings using the "==" operator but only the "equals" or "equalsIgnoreCase" method like this:

row1.DEVICEID.equals("LAB0115AN3131 ")

(or maybe without the final space).

Hope this help.

 

manodwhb
Champion II
Champion II

when it is string field ,use the below expression in active experss Builder.

 

row1.DeviceId.equals("LAB0115ANS3131 ")

 

if you have null data in row1.DeviceId,you may get null pointer exception

for that use below expression.

("LAB0115ANS3131 ").equals(row1.DeviceId)

TRF
Champion II
Champion II

@ksingh, did this help you.

In this case, thank's to mark your cae as solved (Kudo also accepted).

Anonymous
Not applicable
Author

0683p000009LsIL.jpg0683p000009LsMZ.jpg 

am doing this and am not getting any output. Please suggest me something which will helpful for me

manodwhb
Champion II
Champion II

do you have data space like after the end of the value "LAB0115ANS3131 ",if not please remove space.

manodwhb
Champion II
Champion II

can you try with  row1.DeviceId.equals("LAB0115ANS3131") ?

Anonymous
Not applicable
Author

am not getting any output . now what i will do ?

 

TRF
Champion II
Champion II

Hi,

As said in my 1rst answer, it seems you have a space at the and of the string used in your expression.

Is it normal?

However, you may also use a tFilterRow in such a case if you just want to exclude rows not matching with your filter.

Anonymous
Not applicable
Author

its normal. when u told me about space am checked and remove space after that run my job. its full scan but not provide any output. the STRING which am used in express builder am copy from database. means that string is exist in my database.