As per your note, the input_data should be in the format DDMMYYYY. You can check the validity of the date in your Architect flow by extracting the response either entered by the customer or returned from your CRM.
NOTE: The variable input_date must be configured as Input (Yes), as it should be passed from the Architect.
Original Message:
Sent: 06-13-2024 04:43
From: Thomas Repking
Subject: Input of birthdates in a script
Thank you very much for your response, Tatjana.
Unfortunately, I am not able to see it in the preview mode as it is shown in your screenshot. Apparently, I have configured the input component incorrectly and I can't figure out how to do it. May I ask you to also provide me with a screenshot of your input configuration?
Viele Grüße,
Thomas
------------------------------
Thomas Repking
Canada Life Group Services Limited
Original Message:
Sent: 06-12-2024 19:37
From: Tatjana Knezevic
Subject: Input of birthdates in a script
Variable formatted_date should be configured as a String - dynamic.
Dynamic Value:
substr({{input_date}},0,2) + "." + substr({{input_date}},2,2) + "." + substr({{input_date}},4)

In Preview, it looks like this:

------------------------------
Tatjana Knezevic
www.startelecom.cloud
https://www.linkedin.com/company/star-telecom-www-startelecom-ca-/
Original Message:
Sent: 06-12-2024 06:40
From: Thomas Repking
Subject: Input of birthdates in a script
Hi,
I want to allow input of birthdates in a script. Because using the calendar in the date input script component requires too many clicks, I want to use the input script component and validate it so that an input of DDMMYYYY is automatically formatted with dots as DD.MM.YYYY. I tried it with the following regex:
def format_date(input_date):
formatted_date = re.sub(r'^(\d{2})(\d{2})(\d{4})$', r'\1.\2.\3', input_date)
return formatted_date
However, when I test it in preview mode, the input field is highlighted in red, and the format is not converted. Can someone tell me how I need to formulate the regex?
Viele Grüße,
Thomas
#Unsure/Other
------------------------------
Thomas Repking
Canada Life Group Services Limited
------------------------------