Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Merge fields values into one

Explorer ,
Oct 10, 2025 Oct 10, 2025

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.

TOPICS
JavaScript
52
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Oct 10, 2025 Oct 10, 2025
LATEST

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;

 

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 10, 2025 Oct 10, 2025
LATEST

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines