It is better not to put extra brackets in the formula script, so I removed them from my example. But even my example was not entirely correct.
I dare to believe that the Address Street field in your EspoCRM instance is a Varchar field, that is, a text field. And in the formula, we assign it a purely numeric value, like a field with type Integer or Float, when we do not use the upper brackets. Field types are very important when working with a formula; in this case, you cannot assign a numeric value to a text field.
Given all of the above, I can confirm, after checking everything on my EspoCRM instance, that the following formula will work for you:
Code:
ifThen( datetime\diff(closeDate, datetime\today(), 'days') == 1, addressStreet = '199' ); ifThen( datetime\diff(closeDate, datetime\today(), 'days') > 3, addressStreet = '399' ); ifThen( datetime\diff(closeDate, datetime\today(), 'days') == 4, addressStreet = '499' );
Leave a comment: