View Full Version : Replacing a name with title, initial and surname

October 17th, 2013, 03:20 AM
I've been using Fusion Pro for quite a few years now, but I've never really had to dip my toes into rules. I managed to create a rule a few months back where the data changed the appearance of the text, but that was really quite easy using the Rule Wizard.

Anyway, I've got a rule that I need to sort out, but I just can't get my head around the best way to do it.

I have a job where it says "Dear Forename", however, in the data not all of the field 'Forename" has a name. If there is a name missing, then there is 'Title', 'Initials' and 'Surname' which should replace 'Forename' in the output.

Therefore it should output something like this;

Record 1 - Dear Carsten

Record 2 - Dear Mr A Smith

Record 3 - Dear Pete

Is this possible? I would really appreciate any help!! :)


Dan Korn
October 17th, 2013, 09:14 AM
return "Dear " + (Field("Forename") || Field("Title") + " " + Field("Initials") + " " + Field("Surname"));

October 18th, 2013, 08:18 AM
Thanks for getting back to me so quickly Dan! :D