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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Locking a form so only...
Power Apps
Unanswered

Locking a form so only one user can edit at a time

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

I was wondering is there a way to lock a form so that only one user can edit it at a time, and any other users who try to access the form will receive a notification that someone is already editing this form? For example, user A is editing a form and user B tries to access the same form, user B will not be able to access the form and will be notified that someone else is editing it.

 

At the moment, I have a screen with a gallery of items with an arrow button. When someone clicks on this arrow button, it navigates them to the form for that specific item. Is there a way in which I can disable the submit button on the form for user B, or else just not let them access the form at all if someone is already editing it? I have seen 1 or 2 posts about this previously but was unable to make any sense on how to actually go about implementing their solution.

 

Thanks,

Jack.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at

    Hi @Anonymous ,

    When the item is selected from the gallery, set a Variable (OnSelect of the Gallery before your other code).

    Set(gblRecord,ThisItem)

    Then on the Save function before your save action

    If(
     LookUp(
     SPListName,
     ID = gblRecord.ID
     ).Modified <> gblRecord.Modified,
     Notify(
     "This record has been modified since you opened it", 
     Error
     ),
     YourSaveActionHere
    )

    This checks that the modified time/date when the user opened it is still the same (or not)

     

    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.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

    Visit my blog Practical Power Apps

  • harryh6 Profile Picture
    19 on at

    @WarrenBelz 

    I tried using your solution and it gave me this error.

    Error.JPG
    Error2.JPG
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at

    @harryh6 ,

    No error in a test (see below) - the code is valid structure

    WarrenBelz_0-1667594110437.png

    You might also try a Capital U in LookUp

  • harryh6 Profile Picture
    19 on at

    Thank you 🙂

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard