- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2023 12:58 AM
In existing user table i added date of birth for users and now i have to create dashboard for upcoming birthday list and every year it need to show how can i acheive this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2023 01:59 AM
Sure thing!
Write a business rule, as below:
And as script, write something like this:
(function executeRule(current, previous /*null when async*/) {
var nextBirthday = new GlideDateTime(current.getValue('u_birth_date')); // change field name to your custom field name
while(nextBirthday.before(new GlideDateTime())){
nextBirthday.addYears(1);
}
current.setValue('u_next_birthday', nextBirthday); // change field name to your custom field name
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2023 11:32 AM - edited ‎07-26-2023 11:36 AM
I prefer Flow designer over scheduled job, but you can go with either one.
No condition should be needed on the trigger, other than it should run yearly on the first day of the new year.
Adding a simple example below, using Flow designer.
Providing some explanation of some of the steps in the Flow below, first step 1
Step 3
Step 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2023 01:13 AM
Hi create a report on User table, condition birthdate after today. save the report.
Create a dashboard and add this report to dashboard
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2023 01:17 AM
Hi @Abishek V ,
Hope you are doing well
I guess you have create DOB field
In the dashboard, I guess you can just create an interactive filter on DOB and add list type report of sys_user table.
You can put interactive filters like - DOB in this week , in this month etc
Please mark this response as correct or helpful if it assisted you with your question.
Regards,
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2023 01:20 AM
i worked this method but its showing on birthyear of the user

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2023 01:34 AM
Hi,
This is a bit of a tricky one, because (I assume) you store the birthdays as a Date field, and all date operations available when using condition builder calculates dates using the current date as comparison.
For example how many days is it between today's date and a given date. Which works fine if all dates are in the current year, but it's not so usable if looking for a date that is today's date, but several years ago.
I can propose a couple of alternatives here.
You can create another field on the user table, which contains a number, and holds the value of how many days it is left until the next birthday.
You will also need to create some logic that regularly (daily) recalculates how many days it is left until next birthday.
Then you can create a dashboard that shows all users with birthday within 7 days or similar.
Another option would be to create another Date field on the user table (that is not user editable) that contains the value of the next birthday. And this field would automatically calculate the next birthday using the input of the birthday date. Same as before, you still need some logic to recalculate this date, but it would be enough to run the calculation once a year.
Then you can create a dashboard that shows all the upcoming birthdays using a simple condition (something like next birthday is relative before 7 days from now) on the report on the users.
I believe option number 2 would be easier to implement.