Hi
I've gone through every thread I found regarding a gallery showing upcoming birthdays but nothing seems to work for me...
I just can't figure out how to do this. I understand the logic behind it, but I can't get the formulas to work.
I have a Canvas-App with a Dataverse table called "Clients", in it a column called "Birthday" (format DateOnly).
I would like my gallery to show the birthdays for Today()+7.
Grateful for any suggestions.
Thanks in advance
The second formula doesn't work, but the first one finally solved my problem 🙂
Thank you so much!!
Hi @CustomCruiser ,
Guess I was thrown off by the title of the column, since it actually contains the date of birth.
In that case I'd try using the AddColumns function to add a column with the next upcoming birthday:
Filter(
AddColums(
Clients,
"NextBirthday",
If(
Date(Year(Today()), Month(Birthday), Day(Birtday)) < Today(),
Date(Year(Today())+1, Month(Birthday), Day(Birtday)),
Date(Year(Today()), Month(Birthday), Day(Birtday))
)
),
NextBirthday = Today() +7
)
The reason for the If function is for birtdays in the first week of January where, in the last week of December, nothing would get returned because the year is not set correctly.
Apologies up front for any syntax errors, I'm typing this on my phone.
EDIT: an easier way may be:
Filter(
Clients,
Day(Birthday) = Day(Today()+7),
Month(Birthday) = Month(Today()+7))
)
This is something I tried:
If( Month(Birthday) < Month(UTCToday()) Or ((Month(Birthday)) = Month(UTCToday()) And Day(Birthday) < Day(UTCToday())) , DateAdd(Birthday,Year(UTCToday())+1-Year(Birthday),TimeUnit.Years) , Date(Year(UTCToday()),Month(Birthday),Day(Birthday)) )
The last line always generated an error. It said Date is not a valid operator
Hi @CustomCruiser,
My first try would be the below in the Items property of the gallery:
Filter(Clients, Birthday = DateAdd(Today(),7))
However, there may be something in your app I'm not aware of to be taken into account. If the above doesn't do the trick, please share what you have already tried and what the exact outcome was.
WarrenBelz
146,518
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,749
Most Valuable Professional