cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rajkumar88
Post Partisan
Post Partisan

how to set Powerapps all screens to ready only mode after spefici time frame

Hello Everyone,

 

Is there a way to set the screens in read only mode after specific date? I have 6 screens and I need all the users except who are in "manager" column to be not able to edit the content after "say July20".

I am thinking that once a user lands on his landing screen, if he/she click on submitted content, then it should show a screen in ready only. This has to happen after July20. Please let me know your thoughts and steps to achieve this.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @rajkumar88 ,

Do you want to set "edit" button to not visible within the Detail screen after July 20?

Could you please share a bit more about the Manager column in your data source? Could you please share more details about your data source? Is it a SP List?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

1. If your data source is a SP List, and the Manager column is a Person column:

Set the Visible property of the "Edit" button within your Detail screen to following:

If(
   Today() <= Date(2019, 7,20) || User().Email in ForAll('YourDataSource'.Manager, Manager.Email),
   true,
   false
)

2. If the Manager column is a text column, and the Manager column is populated with manager's email:

If(
   Today() <= Date(2019, 7,20) || User().Email in 'YourDataSource'.Manager,
   true,
   false
)

3. If the Manager column is a text column, and the Manager column is populated with manager's displayname:

If(
   Today() <= Date(2019, 7,20) || User().FullName in 'YourDataSource'.Manager,
   true,
   false
)

 

If you just consider the Employee, please set the Visible property of the "Edit" button within your Detail screen to following:

If(                               /* <-- If the current date is more than 07/20/2019, the "Edit" button would not be visible */
   Today() <= Date(2019, 7,20),   
   true,
   false
)

Please take a try with above solution, then check if the issue is solved.

 

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

4 REPLIES 4
wyotim
Resident Rockstar
Resident Rockstar

Without knowing too much of how your app is structured, I would generally suggest using an If/Or statement along the lines of “If the user is a manager or today is before July 20 then activate the editing controls, otherwise don’t activate them”. How to craft that would vary but if you are using a form and you have a button that takes the user to a screen and has a variable which sets the form mode, it would go something like:

// OnSelect of button

If(

    LookUp(UsersTable, Email=User().Email).IsManager && ||

    Today()<Date(2019,07,01),

    Navigate(DataScreen, None, {varFormMode:Edit}),

    Navigate(DataScreen, None, {varFormMode:View})

)

 

Forgive the lack of a code box but I am on my mobile right now. Of course, the way I coded in the manager LookUp is probably nothing like what your actual method is but hopefully this gets you headed in a good direction. Let me know if I can help with any specifics!

*edit for the very obvious && that should have been an || and putting in the correct month. Smiley Embarassed*

 

@wyotim,

 

Thanks for your post. I have Manager screen as seperate and they will have acecss untill July end. And I have Employee screens seperate. When an employee click on his submitted data, as of now it navigates to view only screen of all his submitted info. Employee can edit the content on that screen by selecting "edit" button which will allow to edit info.

 

However, after Jul20, I need them to only review /view the submitted screen and it would not allow them to edit any content. So for that as you mentioned, I need to use date property to restrict and also can I set "edit" button to not visible?

Hi @rajkumar88 ,

Do you want to set "edit" button to not visible within the Detail screen after July 20?

Could you please share a bit more about the Manager column in your data source? Could you please share more details about your data source? Is it a SP List?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

1. If your data source is a SP List, and the Manager column is a Person column:

Set the Visible property of the "Edit" button within your Detail screen to following:

If(
   Today() <= Date(2019, 7,20) || User().Email in ForAll('YourDataSource'.Manager, Manager.Email),
   true,
   false
)

2. If the Manager column is a text column, and the Manager column is populated with manager's email:

If(
   Today() <= Date(2019, 7,20) || User().Email in 'YourDataSource'.Manager,
   true,
   false
)

3. If the Manager column is a text column, and the Manager column is populated with manager's displayname:

If(
   Today() <= Date(2019, 7,20) || User().FullName in 'YourDataSource'.Manager,
   true,
   false
)

 

If you just consider the Employee, please set the Visible property of the "Edit" button within your Detail screen to following:

If(                               /* <-- If the current date is more than 07/20/2019, the "Edit" button would not be visible */
   Today() <= Date(2019, 7,20),   
   true,
   false
)

Please take a try with above solution, then check if the issue is solved.

 

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

@v-xida-msft ,

 

thanks for your solution. Yes I am using SP list and Manager column is "person" field. I am able to set that and working fine without any issue now. 

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,258)