cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Delete and Edit button based on the date in PowerApp

Hello All,

I have created an App. As of now, I need a restriction on editing and deleting the entries in App by the users beyond 20th of every month. Both the Delete and Edit button should be disabled after 20th of every month and it should work between 1st to 20th of every month for the users to enter the data in App. 

Below is the snapshot of the App gallery. Let me know if any further info is required for this query. 

Power Apps.png

 

 

 

Thanks,

S

 

 
3 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User
Super User

Set the DisplayMode property of each icon to:  
If(Day(Today())>20, DisplayMode.Disabled, DisplayMode.Edit)

 

Then is the day is greater than 20, the icon will be disabled.  If less than 20, it will be available for use.

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Community Support
Community Support

Hi @Sumeesh ,

Do you want to disable the Delete and Edit button after the 20th of every month?

 

If you want to disable the Delete and Edit button after the 20th of every month, I agree with @LRVinNC 's thought. Set the DisplayMode property of the Delete Icon and Edit Icon to following:

If(
   Day(Today()) > 20,
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

If you want to disable the Edit and Delete Icon based on the Date type column value of the record, please try the following formula:

If(
   Day(BrowseGallery1.Selected.DateColumn) > 20,
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

Day function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Super User III
Super User III

Hi @Sumeesh,


On DisplayMode property of both edit and delete icon, please add the below formula:

If(
   Day(Today()) > 20,
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

 

Regards,

Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Set the DisplayMode property of each icon to:  
If(Day(Today())>20, DisplayMode.Disabled, DisplayMode.Edit)

 

Then is the day is greater than 20, the icon will be disabled.  If less than 20, it will be available for use.

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Community Support
Community Support

Hi @Sumeesh ,

Do you want to disable the Delete and Edit button after the 20th of every month?

 

If you want to disable the Delete and Edit button after the 20th of every month, I agree with @LRVinNC 's thought. Set the DisplayMode property of the Delete Icon and Edit Icon to following:

If(
   Day(Today()) > 20,
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

If you want to disable the Edit and Delete Icon based on the Date type column value of the record, please try the following formula:

If(
   Day(BrowseGallery1.Selected.DateColumn) > 20,
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

Day function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Super User III
Super User III

Hi @Sumeesh,


On DisplayMode property of both edit and delete icon, please add the below formula:

If(
   Day(Today()) > 20,
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

 

Regards,

Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,897)