cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SSDhul92
Frequent Visitor

How to disable a button if a current month value already exists in gallery in power apps with respect to year.

Hi,
Below formula is for month specific

 

If(Month(ThisItem.CreatedDt) = Month(Now()),DisplayMode.Disabled,DisplayMode.Edit)

 

can any one suggest for 'year' also. Formula should match for both Month & Year.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @SSDhul92 

 

If(And(Year(ThisItem.CreatedDt) = Year(Today()), Month(ThisItem.CreatedDt) = Month(Today()),a,b)

 

hope this helps

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

View solution in original post

1 REPLY 1
rubin_boer
Super User
Super User

hi @SSDhul92 

 

If(And(Year(ThisItem.CreatedDt) = Year(Today()), Month(ThisItem.CreatedDt) = Month(Today()),a,b)

 

hope this helps

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,594)