Simplifying 30@if formulas

I am halfway trying to able to solve it, i have around 30 fields, which if it has values, i will like to display it as "text: + field + text, otherwise do nothing, I will like to add all these fields via semi colon, eg: “text1a” +field1 +“text1b” : “text2a” +field2 +“text2b”

i am thinking to use @Replace, but I still have no idea how to write it , as I don’t want it to display anything if there is no values.

eg:

a:=“text1a” +field1 +“text1b” ;

b:= “text2a” +field2 +“text2b”;

checking=@if(field1???..)

fromlist:= field1 :field2;

to list data:= a : b;

@Replace(checking ; fromlist; tolist)

Subject: Simplifying 30@if formulas

You should look into @transform…

Subject: RE: Simplifying 30@if formulas

@Transform is the devil!

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(Field1) : @Implode(Field2) : @Implode(Field3);

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

REM " ------------------------------------";

BLANKLIST := PRELIST + POSTLIST;

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

Subject: RE: Simplifying 30@if formulas

Tq Simon, I will test your suggestion, really appreciates your codes, this is something I would not have thought off!