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

How to Merge fields to create a date

New Here ,
Mar 28, 2025 Mar 28, 2025

Hello, it is possible to have three diferent fields for month, day & year and create a full date from there in another field?

We have a lot of people that enter always day as a month and I'm trying to avoid mistake and reprocesses.

TOPICS
How to
88
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 ,
Mar 28, 2025 Mar 28, 2025

Sure, but what should the merged field show if only the month and day fields are filled in, for example?

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 ,
Mar 28, 2025 Mar 28, 2025
LATEST

You could use something like this as custom calculation script of the field where you wish to show full date:

var month = this.getField("Month").valueAsString;
var day = this.getField("Day").valueAsString;
var year = this.getField("Year").valueAsString;

event.value = (month && day && year)? month+"/"+day+"/"+year : "";

This assumes field names are "Month", "Day", "Year" and they all need to be filled to show the full date otherwise the field is left blank.
You could add validations to each field so they only accept numbers, for example for month field allow only 1-12, for day 1-31...etc

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