Trim space is not working

text-actions

#1

Hi,

I am trying to read values from CSV file which was populated from by executing SQL query in command line. The results will have white spaces which needs to be trimmed.

I am able to read first column of the CSV file where the results are present with white spaces.But when i tried to trim spaces using the String action “Trim Whitespace” still its not working.

Please assist.

Thanks,
Kishore


#2

@kmkumar1,

please post here the example strings: item and temp variable values (before and after Trim).

We also need to know the RPA Express version you are using


#3

Hi,

RPA Express version is 1.1.4

item value: blahblahblah [[white spaces]]
temp value: blahblahblah[[white spaces]]

Note**: [[white spaces]] is white spaces

I mean , the item holds value (String followed by white spaces).

After Trim also , the temp variable holds the same value (String followed by white spaces) which is not expected.

Conclusion: No difference before and after trim

Please help.
Thanks,
Kishore


#5

Try to apply this action twice. Because when you copy from Excel, your value has also an additional new line symbol at the end.


#6

Stil its not working, tried applying the Trim action twice.

Thanks,
Kishore


#7

please post your recording here


#8

Here is the complete project folder (Archived).

DataBase_test.zip (3.2 KB)

The snapshot of the recording (Actions) are as follows.


#9

The Bot task script is as follows.

Bot_Task_Script.txt (2.6 KB)


#10

Please check and reply


#12

@kmkumar1,

According to your execution result file, the “branches” List has the following content:

branches,List,"""[""""toronto on                                                                      \nMontreal QC    

And the “temp” variable contents is the following:

temp,String,"""toronto on                                                                      
Montreal QC                                                                     
Quebec QC                                                                       
Gloucester Ottawa ON                                                            
Bentley AB"""

So you need to correctly parse the Clipboard content to a List (set separator as new line):