cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
igalriga
Helper I
Helper I

Lock Fields on Monday

I have an app built where the user can enter data into many fields. 

 

What I want is when it is Monday, all fields are locked/not able to be edited, and a little note comes up on the top stating "Today is Monday, data is locked."

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

In the DisplayMode property for each field use the following

if(Weekday(Today()) = 1,DisplayMode.Disabled,DisplayMode.Enabled)

That will disable the control if its Monday.  Use a similar formula in the Visible property of the error label to display it on Monday

if(Weekday(Today()) = 1,true, false)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

In the DisplayMode property for each field use the following

if(Weekday(Today()) = 1,DisplayMode.Disabled,DisplayMode.Enabled)

That will disable the control if its Monday.  Use a similar formula in the Visible property of the error label to display it on Monday

if(Weekday(Today()) = 1,true, false)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

It is saying that my function IF has invalid arguments.

 

If(Weekday(Today()) = 1,DisplayMode.Disabled,DisplayMode.Enabled)

I just tested and the following is working for me in the DisplayMode property of a textbox.

If(Weekday(Today())=3,DisplayMode.Disabled, DisplayMode.Edit)

Its Tuesday and my calendar is set to start with Sunday.  So Monday=2 Tuesday=3



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,222)