Skip to main content
Solved

Use LEFT_TRIM and RIGHT_TRIM together in an external file template

  • November 18, 2025
  • 2 replies
  • 35 views

Forum|alt.badge.img

Hi,

May I know if there is any way to use LEFT_TRIM and RIGHT_TRIM together in an external file template?

I am trying to remove both leading and trailing spaces from the Account field in an external voucher upload.

When I apply both functions together, only the second function works.

For example, if I use LEFT_TRIM as the first function and RIGHT_TRIM as the second, only RIGHT_TRIM is applied, and LEFT_TRIM is ignored.

Thanks in advance.

 

 

Best answer by Furkan Zengin

Hello ​@Lalindu Koralage 

In the second line try this way.

 

Detail Function
Function No Main Function Argument
1 LEFT_TRIM COLUMN_REF(ACCOUNT)," "
2 RIGHT_TRIM DETAIL_REF(1)," "

 

Alternatively you can use the following version

 

 

Function No Main Function Argument
1 REPLACE  COLUMN_REF(ACCOUNT)," ","”

 

Hope this helps

2 replies

Furkan Zengin
Ultimate Hero (Partner)
Forum|alt.badge.img+21
  • Ultimate Hero (Partner)
  • Answer
  • November 19, 2025

Hello ​@Lalindu Koralage 

In the second line try this way.

 

Detail Function
Function No Main Function Argument
1 LEFT_TRIM COLUMN_REF(ACCOUNT)," "
2 RIGHT_TRIM DETAIL_REF(1)," "

 

Alternatively you can use the following version

 

 

Function No Main Function Argument
1 REPLACE  COLUMN_REF(ACCOUNT)," ","”

 

Hope this helps


Forum|alt.badge.img
  • Author
  • Do Gooder (Partner)
  • November 19, 2025

Hello ​@Lalindu Koralage 

In the second line try this way.

 

Detail Function
Function No Main Function Argument
1 LEFT_TRIM COLUMN_REF(ACCOUNT)," "
2 RIGHT_TRIM DETAIL_REF(1)," "

 

Alternatively you can use the following version

 

 

Function No Main Function Argument
1 REPLACE  COLUMN_REF(ACCOUNT)," ","”

 

Hope this helps

 

Thank you.
Both alternatives work for me.