I have a calculation which brings together three fields First Name, Middle Name and Last Name (using function, IFNOTEMPTY, name of calculation field = Client Name).
I am creating a layout using mail merge and have added [Client Name]. I can add bold TO [Client Name] to this, but cannot display (when printed) as all capitals.
As far as I can see there is no option in the settings for a calculation field or in mail merge to display text from a field as all capitals.
In the layout it is possible using Menu option Edit / Transformations / Make Upper Case for selected text, but this has no effect on fields enclosed in [ ].
Is there anyway of doing this?
Hi Victor,
You would need to use a Script field instead of a Calculation field to be able to do something like that.
Here’s a sample that might help:
var first_name_id = "fld....";
var last_name_id = "fld...";
var middle_name_id = "fld...";
var firstName = record.getFieldValue(first_name_id);
var lastName = record.getFieldValue(last_name_id);
var middleName = record.getFieldValue(middle_name_id);
var fullName = "";
if (middleName) {
fullName = firstName + " " + middleName + " " + lastName;
} else {
fullName = firstName + " " + lastName;
}
var result = fullName.toUpperCase();
result;
Brendan,
Thank you very much. This is very helpful and useful.