Hello,
I am trying to set a calculated date value for endDate value when a startDate is selected in a date interval field. However, nothing seems to work for me so far. What am I doing here wrong?
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="ddfa8bbd-a3e8-41a3-8df2-049cefe28d71" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f1</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="32c99bb3-be63-434c-8fd7-52b5055473a9" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="embedded">true</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="e9731b20-7392-4144-a533-494ef23686d7" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">d1</ac:parameter>
<ac:parameter ac:name="fieldLabel">d1</ac:parameter>
<ac:parameter ac:name="values">0</ac:parameter>
<ac:parameter ac:name="extras">dd.MM.yyyy</ac:parameter>
<ac:parameter ac:name="type">datetimeinterval</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<p>
<br/>
</p>
<p>
<ac:structured-macro ac:macro-id="301e891c-1be9-46fb-921b-3e61066f4c65" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">!d1.startDate:[empty]</ac:parameter>
<ac:parameter ac:name="values">d1.endDare=([entry.d1.startDate.timestamp] +1296000000)</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">d1.startDate</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
Might give you an idea how to solve this
Thanks alex. But is there a way to reference just the startDate and then use it to fill the endDate of the date interval field without using an additional date field. Something like this.
dateInterval = [entry.dateInterval.startDate]-[entry.dateInterval.startDate.add(3600000)]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.