Hi,
I'm currently trying to compare the number of days between two custom-field and a hardcoded number of days.
The two custom fields are "Leaving date" and "Coming back date". By using the smart value : {{issue."Leaving date".diff(issue."Proforma : Coming back date")}}, it will return the numbers of days between these two dates using the format : "n days" (ex: 7 days).
However, I'm unable to compare the returned value (ex: 7 days) with a hardcoded one which would be 30 days as you can see in the picture below.
I also tried to put "30 days" and "30d" in the second value, but I can't seem to make it work.
P.S. We would like to implement this rule, because if an employee takes a leave of more than 30 days, we're legally obligated to block his access to our system.
Thank you,
Vincent
Hi @Vincent Roireau-Minville and welcome!
Try using absolute value on the end of your smart value:
{{issue."Leaving date".diff(issue."Proforma : Coming back date").days.abs}}
Let me know if everything worked from your end :)
Alex
Wow Alex, it works like a charm!
Thanks a lot for the help!
Vincent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice to know it worked, and glad to help! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vincent Roireau-Minville - ProForma does not currently support calculating fields, but you can find instructions for creating calculating fields here:
This may not be exactly what you’re looking for, but hope it helps and if you have any additional questions about how to make this work please let me know.
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.