web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how to set Powerapps a...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 397

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.

Categories:
I have the same question (0)
  • wyotim Profile Picture
    2,545 on at

    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*

     

  • rajkumar88 Profile Picture
    397 on at

    @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?

  • Verified answer
    v-xida-msft Profile Picture
    on at

    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,

  • rajkumar88 Profile Picture
    397 on at

    @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. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard