Page 1 of 1

Expression Editor (Replace)

Posted: 04 Jan 2019, 23:26
by christina
Hi All

Wondering if someone can help, I am trying to use the replace function in the expression editor. I have all the replace data correct but I'm not 100% sure how to format the expression.

Currently, the expression is

SALES_ORDER.NOTES_3 = "" ? SALES_LEDGER.COUNTRY_CODE : SALES_ORDER.NOTES_3

but I need to add in the replace expression to change country codes that pull through to Notes 3 from our E-commerce channel so I need it to read something like the below but I can't seem to get it working (I feel I'm missing something after the SALES_LEDGER.COUNTRY_CODE: SALES_ORDER.NOTES_3 before the replace starts.

SALES_ORDER.NOTES_3 = "" ? SALES_LEDGER.COUNTRY_CODE : SALES_ORDER.NOTES_3

(replace(replace(replace(replace(SALES_ORDER.NOTES_3 "Belgium","BEL"),("Denmark","CNK"),("Finland","FIN"),("France","FRA"),

Any help would be fantastic.

Thank you

Re: Expression Editor (Replace)

Posted: 05 Jan 2019, 20:12
by brucedenney
SALES_ORDER.NOTES_3 = "Belgium"?"BEL":SALES_ORDER.NOTES_3 = "Denmark"?"CNK":SALES_ORDER.NOTES_3 = "Finland"?"FIN":SALES_ORDER.NOTES_3 = "France"?"FRA":SALES_ORDER.NOTES_3

Untested, but I think it is right.