How to add a month in Confiforms via IFTTT Macro

Nicole Müller February 16, 2025

Hi,

I need a possibility to add a month to a startdate. I tried it via IFTTT macro, when the startDate is changed (onModified):

entryId=[entry.id]&CalculatedEndDate=[entry.StartDate.formatDate(M).add(3).append( [entry.StartDate.formatDate(yyyy)]).parseDate(M yyyy)]

The month is calculated correctly but the day is always set on the first day of the month.

 

ConfiformsMonth.JPG

Has anyone an idea how to solve it?

Thanks a lot, Nicole

 

3 answers

0 votes
Nicole Müller February 17, 2025

Is there any possibility to debug in confluence like in Java with Eclipse?

0 votes
Nicole Müller February 17, 2025

I am new to confiforms and confluence. Do any debugging tools exist like in java with eclipse?

0 votes
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 16, 2025
entryId=[entry.id]&CalculatedEndDate=[entry.StartDate.formatDate(M).add(3).prepend([entry.StartDate.formatDate(dd)] ).append( [entry.StartDate.formatDate(yyyy)]).parseDate(dd M yyyy)]
Nicole Müller February 16, 2025

Hi,

wow, quick answer :-). I need the date in the format dd.MM.yyyy, like you see in the screenshot. If I test you code I get the error message:

Value '01.01.1970 for 'Abgabe am (berechnet)' does not match the validation rule (dd.MM.yyyy) set for this field. What can I do?

 

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2025

Not sure how this message is coming up, but when I quickly test the solution it works well here

Screenshot 2025-02-17 at 10.00.03.png

Formatting pattern is just for the rendering/showing 

(but I recall we had some issue with datetime value validation a while ago and it was fixed since ConfiForms version 3.7.7 - https://wiki.vertuna.com/display/CONFIFORMS/Release+Notes)

Nicole Müller February 17, 2025

We use datacenter and Confiforms 3.14.4. I think I had a blank in the code from copying it. Could be the error with the validation rule.

I tested it now from scratch, these are my configurations, perhaps you can see anything is wrong.  (AbgabeDatumBerechnet == CalculatedEndDate, StartDate == StartDatum)ConfiformsMonth4.JPGConfiformsMonth3.JPGConfiformsMonth2.JPGConfiformsMonth1.JPG

 

Now this is my result

ConfiformsMonth5.JPG

 

PS: If i use weeks to calculate "9 weeks" it works. entryId=[entry.id]&AbgabeDatumBerechnet9Weeks=([entry.StartDatum9Weeks.timestamp] + (9*7*86400000))

I am confused.

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2025

What is the expression you have in the IFTTT macro when you set the parameters?

Nicole Müller February 17, 2025

Condition: hasChanged(StartDatum):true

 

Do you mean that?

entryId=[entry.id]&AbgabeDatumBerechnet=[entry.StartDatum.formatDate(M).add(3).prepend([entry.StartDatum.formatDate(dd)]).append([entry.StartDatum.formatDate(yyyy)]).parseDate(dd M yyyy)]

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2025

You are missing a space in here .prepend([entry.StartDatum.formatDate(dd)]).

See what I have posted... it is important to construct the value that is parseable by the pattern you give later in the parseDate function

Nicole Müller February 17, 2025

If I change it into:

entryId=[entry.id]&AbgabeDatumBerechnet=[entry.StartDatum.formatDate(M).add(3).prepend([entry.StartDatum.formatDate(dd) ]).append( [entry.StartDatum.formatDate(yyyy)]).parseDate(dd M yyyy)]

 (with spaces I copied from your entry after "(dd) "  and one after "append()" )

formatDate(dd) ]).append( [entry.StartDatum

   I get the error from the beginning:

Value '01.01.1970 for 'Abgabe am (berechnet)' does not match the validation rule (dd.MM.yyyy) set for this field.

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2025

Hard to understand what is wrong in your setup seeing just small bits - but clearly the date that is constructed could not be parsed

Make the AbgabeDatumBerechnet field as text and have something like this in the IFTTT

entryId=[entry.id]&AbgabeDatumBerechnet=[entry.StartDatum.formatDate(M).add(3).prepend([entry.StartDatum.formatDate(dd) ]).append( [entry.StartDatum.formatDate(yyyy)])]

 What value it produces?

Nicole Müller February 17, 2025

Hi

sorry for the late reply. If I change AbgabeDatumBerechnet into a text field, it produces the following:

ConfiformsMonth6.JPG

 

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2025

You can that there is no space… and something like that could not be parsed as dd M yyyy

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2025

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events