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.

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.

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.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,244)