How can I compare dates in filters/conditions within IFTTT?

Manuel_vA June 24, 2023

Goal

I want to have a condition for an IFTTT that compares two date fields and evaluates to true in case my condition is met.

 

Condition

The Confiforms Filter Documentation is stated to be valid for Cloud as well. 

Based on it I tested a few syntax variants and these are my most promising ones:

- ([entry.DueDate.timestamp]-5184000000):<_now

- ([entry.DueDate.timestamp]-5184000000):<[now]

- ([entry.DueDate.timestamp.add(-5184000000)]:<_now]

- [entry.DueDate.timestamp.add(-5184000000)]<_now

- 'DueDate' -> custom field in my Confiforms form

- 5184000000 -> 60 days in ms.

I want the condition to be met 60 days before my 'DueDate' approaches. So I subtract 5184000000 ms from the timestamp [entry.DueDate.timestamp] and compare it with [now].

My IFTTT fires like expected when I leave the condition/filter out.

 

Simplified setup

I tried to simplify things by testing a simpler filter/condition in my IFTTT:

//Simpler Dates:

_yesterday:<_today


//Hard-coded dates:

[date20230612]:<[date20230615]


//Hard-coded numbers (3 variants):

2:>1
2>1
(2>1)

None of these tests did work either!

When I only wrote one single number in the condition/filter it got interpreted as true. I assume my problem is primarily the comparison operator.

 

Any kind of help is appreciated!

2 answers

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 24, 2023

Hi @Manuel_vA 

DueDate.add(-5184000000)):<[entry._now]

Alex

Manuel_vA June 26, 2023

Hi @Alex Medved _ConfiForms_ ,

 

thanks a lot for your reply! I tried your answer but unfortunately the IFTTT still doesn't trigger: (when giving appropriate input)

Screenshot 2023-06-26 at 23.12.29.png

It seemed to me like there sneaked in one too many bracket. So I also tried your expression this way:

DueDate.add(-5184000000):<[entry._now]

But unfortunately it doesn't trigger my IFTTT both ways.

 

Also this simple filter condition doesn't work. Shouldn't this work for sure?

Screenshot 2023-06-26 at 23.23.36.png

But it works if I leave out the comparison operator and e.g. only write '2'.

 

Nice Greetings

Manuel

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2023

Hi

What does not work for you?

The condition we have will trigger when someone selected a DueDate that is 60 days and more in the PAST

Alex

Manuel vA
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 30, 2023

-

Manuel_vA June 30, 2023

Hi @Alex Medved _ConfiForms_ ,

 

sorry for my late reply!

 

The condition we have will trigger when someone selected a DueDate that is 60 days and more in the PAST

This is exactly what does not happen in my form. With this setup (correct input data, correct filter syntax) the IFTTT still doesn't trigger.

 

 

What does not work for you?

I assume that I have another problem in my form that causes this behaviour. Because not only your suggested solution doesn't work in my IFTTT. All filter/conditiosn don't work that include a comparison ( operators: < or > etc) in any way. So I guess I have other problem(s).

 

Thanks a lot for your help!

I will mark this question as answered since it should help other people.

0 votes
Manuel vA
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 24, 2023

I finally found a solution for my question above that worked for me:

_today:>[entry.DueDate.add(-5184000000)]

Explanation:

'DueDate' is the name of a date entered by the user. I want to substract 60 days (5184000000) and then check if the result is smaller than today's date and return True or False.

 

(Confiforms-Cloud version: 1.2.228-AC).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events