- Cloud Deployment
- JPD
- I am admin of the project.
- Building an automation rule that tries to set the value of the custom field Duration (type: number) based on the difference between two custom fields: Project Start (type: date) and Project Target (type: date). While the rule runs successfully, I'm unable to get the right value.
- Tried to use different formula likes {{daysBetween(Project target, Project start)}} but unable to get anything meaningful.
If I add some debugging:
Debugging Duration Calculation:
Project Start: {{Project start}}
Project Target: {{Project target}}
Calculated Duration: {{daysBetween(Project target, Project start)}}
What I get in output is this:
Debugging Duration Calculation: Project Start: {"start":"2025-10-01","end":"2025-10-01"} Project Target: {"start":"2025-12-31","end":"2025-12-31"}
indicating that even though Project Start and Project Target are of type date, the include somehow a range.
I tried many different ways to parse (json parse, match) and try to get only one date out of the range, but I always get empty strings. {{Project start}} is simply evaluating to null or an empty string from the very beginning, before any .jsonParse, .match, or .toDate can even try to act on it.
How can I get to the date values inside the fields of type Date in JPD?