cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SSDhul92
Regular 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

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

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,549)