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

Show all info in one field

Explorer ,
Nov 06, 2025 Nov 06, 2025

Hi, I have few info fields (Name,LastName,Address,Phone,Email) how can I get all info into one multiline field with labels in front of info?

TOPICS
JavaScript
97
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
2 ACCEPTED SOLUTIONS
Community Expert ,
Nov 06, 2025 Nov 06, 2025

Use this as custom calculation script of multiline field:

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

event.value =
 "Name: " + name + "\n" +
 "Last Name: " + lname + "\n" +
 "Address: " + address + "\n" +
 "Phone: " + phone + "\n" +
 "Email: " + email;

 

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 ,
Nov 06, 2025 Nov 06, 2025
LATEST

Sure:

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

var output = "";

if (name)     output += "Name: " + name + "\n";
if (lname)    output += "Last Name: " + lname + "\n";
if (address)  output += "Address: " + address + "\n";
if (phone)    output += "Phone: " + phone + "\n";
if (email)    output += "Email: " + email + "\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 ,
Nov 06, 2025 Nov 06, 2025

Use this as custom calculation script of multiline field:

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

event.value =
 "Name: " + name + "\n" +
 "Last Name: " + lname + "\n" +
 "Address: " + address + "\n" +
 "Phone: " + phone + "\n" +
 "Email: " + email;

 

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
Explorer ,
Nov 06, 2025 Nov 06, 2025

Can you modify the script so it shows a label only when the field is filled?

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 ,
Nov 06, 2025 Nov 06, 2025
LATEST

Sure:

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

var output = "";

if (name)     output += "Name: " + name + "\n";
if (lname)    output += "Last Name: " + lname + "\n";
if (address)  output += "Address: " + address + "\n";
if (phone)    output += "Phone: " + phone + "\n";
if (email)    output += "Email: " + email + "\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