How do i write an expression where only when the Current time of a thing is within 3 months of the created time of a thing. (cannot be greater than 3 months). It must only be from the Current time and the last time the thing was created. Below are all the operators that are visible. There is no >= or <= or +*/. The expression bellow doesn’t appear to be working. I only want it to calculate within 3 months or less. Nothing pass 3 months.
I’m sure someone with more experience will chime in, but here’s what I might be able to offer.
First of all, “within 3 months” might be a bit ambiguous. Months have different numbers of days. Doing something like “within 90 days” is a bit easier to calculate consistently.
IF the “within 90 days” works for you, you can try something like this:
(obviously, I am checking for 30 days, but you could check for any number)
The “my_subscription_details’s 3 months ago” would be the past date you are using for your calculation, which (I think) for you would be the created_date.
Hopefully, this might help.
Thank you, I will certainly test this.
Anyone else willing to chime in?
Does this logic make sense?
Only when: “Current Date > Current cell’s Thing Created Date+days: -90 and Current cell’s Thing Created Date+days: -90 < Current Date”
If within 90 days: True
If after 90 days: False
This part alone will ALWAYS be true.
Current date will ALWAYS be greater than a thing’s created_date. As soon as you have a created_date, it is by default automatically in the past in relation to the current date.
And subtracting 90 days from the created_date will only make it FURTHER in the past in relation to the current date.
I already knew the first part was true, just wanted to see if the other part would complete the equation. Do you have any ideas on how I could rewrite this? Or somehow get it close enough?
I tried this as well by removing “+days: -90” from the 2nd part, still not evaluating correctly.
Only when: “Current Date > Current cell’s Thing Created Date+days: -90 and Current cell’s Thing Created Date < Current Date”
I still think what I originally suggested would work and be easy to understand.
For your example, it would be:
Current Date - created_date formatted as days <=90 (it was created within 90 days of the current date)
Current Date - created_date formatted as days >90 (it was created more than 90 days ago from the current date)
No, for some reason your method is not evaluating to true.
If you want this behavior just one condition is enough and your condition should be:
Current cell’s Thing's Created Date > (Current date/time +days -90)
This is not evaluating to true.
This expression, “Current Date > Current cell’s Thing Created Date+days: -90”, has been the closest to what I want, the only thing is that it exceeds the 90 days. If within 90 days:True. If exceeds 90 days: False
Is it even possible to write an expression for this?
What do you mean? I have tested this.
This:
evaluates to True
if Current Cell's thing's created date
is for example January 1, 2025
and Current Date/time
is today
. Because Current Date-90
is November 13, 2024
and January 1, 2025
is greater than November 13, 2024
which means January 1, 2025 > November 13, 2024
evaluates to true
.
If it doesn’t evaluate to true in your case, probably something is wrong with your Current Cell’s thingies.
Sorry, let me run tests, this time from a blank canvas. Perhaps it’s my total workflow actions thats making this expression run incorrectly.
Thank you, it works with the default Creation field! I think the problems lies with the extra “created field” that I added. It wasn’t evaluating correctly. Why would it work with just the default “Created Date” field(bottom) and not work with the added “Created field” (top)?
This final result it evaluating correctly, but I need an explanation why it’s not evaluating the other “created date”?
I think with the additional “created date”, using “+days:-90” doesn’t work. That’s why I think wasn’t evaluating correctly. For some reason it doesn’t seem to be evaluating the “+days:-90”.
Go and give it a test, I think my theory is correct.
I’ve already tried numerous times.
So technically the question still isn’t solved because "days:-90 is not working with the additional “created date”. If there is a work around, “I’m all ears”.
It is working with other fields as well. See the demo below. I have added a field that is a date and evaluated the same thing to understand if the thing’s that new field’s value is newer than 90 days or not. It works. I am pretty sure you have a different problem in your logic.
In this example, the created date is a field I have added later, not a built-in field.
You were right, now it’s working. It must have been something with my logic. Thank you!