[SOLVED] Send email if date field value is equal to today

12 years 3 months ago #189825 by krileon
Does it work without the condition? Please provide a screenshot of your email action configuration.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 3 months ago #189863 by deltafidesign

krileon wrote: Does it work without the condition? Please provide a screenshot of your email action configuration.


Without the condition it sent out the e-mail.

In the attached file you can see a screenshot.
Attachments:

Please Log in to join the conversation.

12 years 3 months ago #189910 by krileon
Then the condition isn't being met. Please place both substitutions in the email and let it send. This will give you exactly what the condition is trying to match against. You're trying to compare 2 dates it looks like all the way down to the seconds; so if it's off by even 1 second it won't match.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 3 months ago #189915 by deltafidesign
I've done what you suggested and this is the result of the e-mail I received:


[cb:date format="Y-m-d H:m:s" /] >>>>>> 2012-02-02 15:02:25

[cb_datefieldifferent_for_users] >>>>>> 2099-12-31

Some users have this field value setted to 2099-12-31,ok... but before upgrading to V.2.2.3 and then to 2.3.0 it worked correctly; now it doesn't, why?

Thanks

Please Log in to join the conversation.

12 years 3 months ago - 12 years 3 months ago #189938 by krileon
Date fields don't store time, nor do they return time. You only need to match against the date. Matching against time anyway will make it pretty impossible to match. Please try the below for just the date.

[cb:date format="Y-m-d" /]

I've no idea why upgrading would cause it to stop working as it should have never worked. I've no idea what condition you're using either as it's translated. There is no date specific condition handling so can't guarantee doing say greater than would work.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 3 months ago #189950 by deltafidesign

krileon wrote: Date fields don't store time, nor do they return time. You only need to match against the date. Matching against time anyway will make it pretty impossible to match. Please try the below for just the date.

[cb:date format="Y-m-d" /]

I've no idea why upgrading would cause it to stop working as it should have never worked. I've no idea what condition you're using either as it's translated. There is no date specific condition handling so can't guarantee doing say greater than would work.


Really before I let it work with [cb:date format="Y-m-d" /], but now it doesn't work neither cases. Anyway, I need to compare a field date of users to daily date and send to myself an e-mail that advice me about something.

That's my case:
User field with date (example tomorrow: 2012-02-03)

Tomorrow I'll login and I would like that the plugin will test the condition: if [cb:date format="Y-m-d" /] equal or greater than cb_userdatefield then sent out an email to me to advice about this.

Is this possible?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.225 seconds

Facebook Twitter LinkedIn