Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

TRIM Function in Editor

Hi all,

I have a quick question, as you know, to avoid issues with case sensitivity it is important to due a TRIM and UPPER function of the field or fields that may have this issue.

I've not been able to test this since my designer course, but I do remember that if you enter the function in the editor that TRIM would do the same function as it does in Excel, take away any extra spaces inside and outside.

Example:

Apple Tree (added extra space after)

Apple  Tree

That if I added TRIM UPPER, my list box would show for the two above:

APPLE TREE

Am I correct in this assumption?

Thank you

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi Ricardo,

You are right.

You can test the same by copying below code in your script editor.

load*,

upper(trim(Text)) as Text2;

LOAD * Inline

[

Text

Apple  Tree

];

Regards

ASHFAQ

View solution in original post

4 Replies
ashfaq_haseeb
Champion III
Champion III

Hi Ricardo,

You are right.

You can test the same by copying below code in your script editor.

load*,

upper(trim(Text)) as Text2;

LOAD * Inline

[

Text

Apple  Tree

];

Regards

ASHFAQ

Not applicable
Author

thanks very much

Not applicable
Author

Additional question, will this function work for thousands of records?

For instance:

Apple    Tree

apple tree

Apple  tree

Maple Tree

maple         tree

Maple  tree

My list box, if using trim/upper in script editor would return only 2 values of APPLE TREE and MAPLE TREE, yes?

ashfaq_haseeb
Champion III
Champion III

Hi, yes it will work

you get 2 values because Qlikview stores only distinct values in list boxes.

Regards

ASHFAQ