Wish a user Happy Birthday

Hiya guys, I know this should be relatively simple but I’m getting tripped up, I’m using the Sometimes Visible condition for the text based on the User D.O.B, but I can’t quite figure out how to determine that the current day matches it, especially from the actual birthday, not like a year ago or something like that.

Think I just need a little push :slight_smile:
Thx

1 Like

I guess it would be something along the lines of:

Only visible if
Logged in user DOB (property in your database)
is equal to
Current date

2 Likes

Hmm yeah, that’s what I was thinking. But won’t that only match once? Say the year of birth? Maybe if there’s a way to omit the year? :thinking:

I think you’re probably correct there! A quick solution I’ve thought of could be that you have the DOB broken down into 3 properties in your database (day, month, year).

When a user signs up you can have a customer form with inputs that allows them to enter the day, month and year separately (but all updated at the same time when they press submit).

Then the conditional visibility can be based on just the day and month. What do you think?

There’s probably a better solution someone with a bit more experience than me can come up with though

3 Likes

Clever! Definitely worth a try. Thx :slight_smile:

I believe this is the solution! Just did a quick code search and even in this Java example, it’s how it’s done :slight_smile: Nice one!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.