Creating a Birthday Tracker
Asked by Dennis Hooks:

Trying to create an HR tracker for birthdays from Custom Field birthday. This date is always in the past by variable years and I'm trying to auto-populate cards which generate alerts for due dates tied to these dates: \[Joe's\] birthday is seven days away.   

I've realized I need a separate list which generates with a due date set off the custom field "Birthday" because automations only cue from due dates, not custom fields. But based on that, I've tried brute forcing iteration, which caps out at four cycles (a date set in 1990 will move forward one year per cycle until 1994). The elegant solution is to use date math to cover:  

When due date set in past greater than {yeardaynumber} days ago, move due date by {{{cardstartdateyear}\*12}-{{year}\*12}} months  

Since I can't use years, I'm stuck with months. However; I'm getting CANT_PARSE_COMMAND. Any help on what I've got wrong in my logic or syntax? Or advice?

This covers half the equation but if I can figure this side out, I can cover the other half (due date between beginning of current year and current date, moving the date to next year).   

Thanks!


Answers:
author: Carolina Lopez
body: Hi Dennis,

Trello Automations has some limitations, and the error you're seeing is because you're trying to use the variable {yeardaynumber} while trying to add a filter to the rule ({yeardaynumber} days ago).

I suggest using another [Custom Field](https://support.atlassian.com/trello/docs/working-with-custom-fields/) to populate the due date instead of using math.

You can see in [this article](https://support.atlassian.com/trello/docs/arithmetic-and-formatting-in-date-variables/) that you can format the date using only the information you need. For example, you can format a date to be shown as DD/MM/YY or YY/MM/DD when you want to put this info into another field, depending on its type. With this, you can get the info from the complete date (for example, 06/16/1964) and get just the date and month using **\~ MM/DD** or **\~ DD/MM** (06/16 or 16/06) after a [variable](https://support.atlassian.com/trello/docs/butler-variables/).

Here's an example of how I used date formatting to create the rules:

* I created the Custom Fields **Birthday** and **Birthday without year.**
* This rule was created to populate the **Birthday without year** field

  ```
  when custom field "Birthday" is set, set custom field "Birthday without year" to "{{%Birthday~ DD/MM}}"
  ```

* This rule will populate the **due date** with the date set on **Birthday without year**   

  ```
  when custom field "Birthday without year" is set, set due date on the date in custom field "Birthday without year"
  ```

* Now I'll have the due date with the birthday on the current year (or the following year, depending on the month)  
* I can use standard due date notifications, or I can create an email notification automation when the due date is coming  

  ```
  7 days before a card is due at 09:00 am, send an email notification to "email@email.com" with subject "{cardname}'s birthday is seven days away" and message "{cardname}'s birthday is on {cardduedate}"
  ```

* After the date passes, you can set the due date for the next year

  ```
  when the due date is marked as complete in a card, move the due date to the same day next year
  ```

I know it may be a little confusing, so please let me know if you have any questions.

comments: author: Melanie Sutton
body: Hi Carolina,

Is this suggestion still active? I followed the steps, but it won't let me set due date on the date in custom field "Birthday without year" because it is a text box (not date).

I've also tried setting "Birthday without year" as a date field, but when I try to do step one, it only lets me use custom text fields.

Please advise.

Thanks!


author: Carolina Lopez
body: Hi Melanie,

Thanks for sending your question. I just tested it to confirm, and it works. Both Custom Fields were created as date fields.  
I recorded a quick GIF video to show the rules in action.  

![2024-05-07_17-26-21 (1).gif](https://community.atlassian.com/t5/image/serverpage/image-id/322477iA524AD0785AC8376/image-size/large?v=v2&px=999 "2024-05-07_17-26-21 (1).gif")  

Do you have any error messages while trying to create the rules? If so, could you please send them here?


author: Melanie Sutton
body: Here is a [Screen recording](https://drive.google.com/file/d/14BueAOSLKHC7Z3vyrxPuylAxqjN325d6/view?usp=sharing) of my attempt. I can't figure out what I am doing wrong. Any insight is appreciated :)


author: Carolina Lopez
body: You can copy and paste the Custom Field name. As the option is originally made to use with fields other than date, the date Custom Fields are not listed. However, if you fill in the Custom Field name manually, it should work.  

Let me know how it goes!