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.
Has anyone an idea how to solve it?
Thanks a lot, Nicole
Is there any possibility to debug in confluence like in Java with Eclipse?
I am new to confiforms and confluence. Do any debugging tools exist like in java with eclipse?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
entryId=[entry.id]&CalculatedEndDate=[entry.StartDate.formatDate(M).add(3).prepend([entry.StartDate.formatDate(dd)] ).append( [entry.StartDate.formatDate(yyyy)]).parseDate(dd M yyyy)]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure how this message is coming up, but when I quickly test the solution it works well here
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
Now this is my result
PS: If i use weeks to calculate "9 weeks" it works. entryId=[entry.id]&AbgabeDatumBerechnet9Weeks=([entry.StartDatum9Weeks.timestamp] + (9*7*86400000))
I am confused.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the expression you have in the IFTTT macro when you set the parameters?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
sorry for the late reply. If I change AbgabeDatumBerechnet into a text field, it produces the following:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can that there is no space… and something like that could not be parsed as dd M yyyy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can quickly see what the expression produces by using the PlainView - https://wiki.vertuna.com/display/CONFIFORMS/Using+PlainView+to+debug+ConfiForms+expressions%2C+Velocity+templates+and+more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.