Skip to main content
Known Participant
Oct 10, 2025 11:27 AM UTC
Answered

Merge fields values into one

Hi, need help, I have 4 fields "Name","Phone","Email","Address", I also have multiline text field and need each value in separate line with corresponding prefix, any help is appreciated.

Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
Oct 10, 2025 11:32 AM UTC

You can use the following as custom calculation script of multi-line field:

var name = this.getField("Name").valueAsString;
var phone = this.getField("Phone").valueAsString;
var email = this.getField("Email").valueAsString;
var address = this.getField("Address").valueAsString;

var output = "";

if (name) output += "Name: " + name + "\n";
if (phone) output += "Phone: " + phone + "\n";
if (email) output += "Email: " + email + "\n";
if (address) output += "Address: " + address + "\n";

event.value = output;

 

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
Oct 10, 2025 11:32 AM UTC

You can use the following as custom calculation script of multi-line field:

var name = this.getField("Name").valueAsString;
var phone = this.getField("Phone").valueAsString;
var email = this.getField("Email").valueAsString;
var address = this.getField("Address").valueAsString;

var output = "";

if (name) output += "Name: " + name + "\n";
if (phone) output += "Phone: " + phone + "\n";
if (email) output += "Email: " + email + "\n";
if (address) output += "Address: " + address + "\n";

event.value = output;

 

Translate