How to disable a button if a current month value already exists in gallery (Created Date) in power apps.?
Can any one Suggest.?
Thanks in advance.
Solved! Go to Solution.
@SSDhul92 you can try this
If(IsEmpty(Filter(DataSource.CreatedDt, Month(CreatedDt) = Month(Now()))),DisplayMode.Edit,DisplayMode.Disabled)
or
If(IsEmpty(Filter(Gallery.Allitems, Month(CreatedDt) = Month(Now()))),DisplayMode.Edit,DisplayMode.Disabled)
Hi @SSDhul92 ,
if the created date is date type column and the button is inside of gallery. you can try this in the displaymode property of your button
If(Month(ThisItem.CreatedDt) = Month(Now()),DisplayMode.Disabled,DisplayMode.Edit)
Hi @Krishna_R
The Button is outside the gallery. can you suggest in this scenario.
@SSDhul92 you can try this
If(IsEmpty(Filter(DataSource.CreatedDt, Month(CreatedDt) = Month(Now()))),DisplayMode.Edit,DisplayMode.Disabled)
or
If(IsEmpty(Filter(Gallery.Allitems, Month(CreatedDt) = Month(Now()))),DisplayMode.Edit,DisplayMode.Disabled)
Hi Power Apps team.
Thank you this helped me solve a user to 1 site in my initial solution.
I need to Filter the below so that the "Manager" (CurrentUser) and multiple sites they access (SiteName) allows them to enter 1 entry per the multiple sites they need to.
The dropdown/combobox can Filter which Sites have not been captured for the current month. But also needed to know how to achieve that.
If(IsEmpty(Filter('Site Security Scorecard'.Date_of_ScoreCardEntry, Month(Date_of_ScoreCardEntry) = Month(Now()))),DisplayMode.Edit,DisplayMode.Disabled)
Update 1:
I have been able to add the logic for checking IF the User and Site are for the currently logged in User/Site along with the Month logic in the below.
But I think my syntax is wrong for checking the List field for Site User and Site Name. Can anyone guide me on what might be wrong with my syntax?
If(
IsBlank(
Filter(
'Site Security Scorecard'.Site_User = Label5_1.Text)
)
), && IsBlank(
Lookup(
'Site Security Scorecard'.SiteName = Label6.Text
)
), && IsBlank(
Filter(
'Site Security Scorecard'.Date_of_ScoreCardEntry,
(Month(Date_of_ScoreCardEntry) = Month(Now()))
)
),
DisplayMode.Edit,
DisplayMode.Disabled
)
User | Count |
---|---|
250 | |
105 | |
82 | |
51 | |
43 |