airmoi

Trim in a list() in a let(...)... loose the trim !

Discussion created by airmoi on Sep 21, 2017
Latest reply on Oct 13, 2017 by TSGal

Here is a really strange bug I just discovered.

 

Given this calculation :

Let( [
_fieldA = Trim ( fieldA ) 
; _fieldB = Trim ( fieldB )

; _list.test = List (  _fieldA  ; _fieldB )


] ; 
_list.test & ¶ & 
Substitute ( _list.test ; ["¶" ; "_"] ; [" " ; "_"] ) 

)

With :

FieldA = "Foo"

FieldB = "Bar "

 

Result :

Foo

Bar

Foo_Bar_

(Notice that "Bar" stile have its trailing space)

 

Now replace _fieldB by $fieldB, you'll get the correct result :

Foo

Bar

Foo_Bar

Outcomes