Skip to main content
Known Participant
October 10, 2025
Answered

Merge fields values into one

  • October 10, 2025
  • 1 reply
  • 64 views

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.

Correct answer Nesa Nurani

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
October 10, 2025

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;