@Replace, how to get rid of comma is value is empty

I am using @Replace, to fill in some text and value of fields as example below, however, although it will not show any values should the field value is null, the “comma” still appears; I guest because I am using “:”, how to get rid of it?

REM {Parallel Lists, long as you like, use implode if field has multi values or this will go bonkers};

PRELIST := “Text1a” : “Text2a” : “Text3a” ;

VALUELIST := @Implode(B_Mth) : @Implode(B_Custodian) : @Implode(B_AdInfo1);

POSTLIST := “Text1b” : “Text2b” : “Text3b”;

REM { ------------------------------------};

BLANKLIST := PRELIST + POSTLIST;

@Trim(@Replace(PRELIST + VALUELIST + POSTLIST ; BLANKLIST ; “”))

Subject: @Replace, how to get rid of comma is value is empty

Unless you want to combine the values of prelist and postlist, you should use : instead of + to add 2 lists together.So:

…

REM { ------------------------------------};

BLANKLIST := PRELIST : POSTLIST;

@Trim(@Replace(PRELIST : VALUELIST : POSTLIST ; BLANKLIST ; “”))

Subject: RE: @Replace, how to get rid of comma is value is empty

Tq, Rene, I used @Trim and @Implode to get rid of “;;;;;” when some fields are blanked but replaced them with one “;” after that.