Hi
I'm creating automation where date value come from Assets and date format is in variable
End date: {{object."End date"}}
Now i have in Assets another field ( {{object."Renewal date notice period (calendar days)"}}) where is stored days in number format what is needed to calc off from "End date"
So i log both into audit log.
Renewal date: {{object."Renewal date notice period (calendar days)"}}
End date convert value {{object."End date".format("dd/MM/yyyy")}} and i just did to test that maybe date format is wrong.
So when i write in .minusDays(30) this calc works and it shows from orginal date 30 days off but how to write it with value what come from assets and today it is 30 but tomorrow it is 180?
End Date minus Renewal Date: {{EndDateminusRenewalDate}}
{{object."End date".minusDays(30).format("dd/MM/yyyy")}}
In log side it seems to be nice:
Idea is that orginal date is 23.01.2026 then in renewal date notice period (calendar days) say how many days have to take off and then automation will send e-mail.
Hi @Urmo
I think I have tested something like this before.
As you created a variable called "RenewalDate" (I believe this stores the number of days)
Use the smart value:
{{object."End date".minusDays(RenewalDate).format("dd/MM/yyyy")}}
In Assets this is just number and Type Value = Text.
So from Assets it is taken out into automation to Log action:
Renewal date: {{object."Renewal date notice period (calendar days)"}}
and this value is added into Create variable with name RenewalDate
Renewal date: {{object."Renewal date notice period (calendar days)"}}
but when calc happens it does not work anymore.
Variable name EndDateminusRenewalDate
{{object."End date".minusDays(RenewalDate).format("dd/MM/yyyy")}}
Still log is empty.
But when i add {{}}
{{object."End date".minusDays({{RenewalDate}}).format("dd/MM/yyyy")}}
I'll get error:
Create variable 28/11/2025, 14:13:24
Unable to render smart values when executing this rule:
Failed to get value for object."End date".minusDays({{RenewalDate: {{object."End date".minusDays({{RenewalDate}}).format("dd/MM/yyyy")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Urmo
Created Variables are text values, even when they look like a date / time value.
To use a variable as a date / time, such as with the minusDays() function, the variable must be converted with the toDate() function immediately before the minusDays() function:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Issue was in Create variable because i don't know why i did but field name into smart value and after adding log i notice that i have more data in field as should.
Working way is:
{{object."End date".minusDays(RenewalDays.asNumber).format("dd/MM/yyyy")}}
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.