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 fields or data...
Power Apps
Unanswered

Locking fields or data cards upon submit

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a PowerApps form with a couple of data cards that the user wants to be locked after the form is submitted, so that when someone goes back in, they can't edit the form. But there are basically two points when the form gets submitted, so I'm running into problems making that work.

 

The process is someone submits a form that has a toggle and a date field. These are hidden in the On New state. The user fills out the form and submits it.

 

Another user opens the form. Now the form is in Edit mode and the toggle and date field are visible. The user switches the toggle to yes to indicate that the review is complete and enters a date. Then Submits to save the form.

 

We would like for the toggle and the date field to be locked at that point so that the next time the form is opened they are either disabled or hidden (either is fine).  Is there any way to do this?

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Add 2 choice filed in your list.

    Submitted and Reviewed. Both have 2 choices. Yes and No. Default value will be No. They can be hidden or visible in your form. It's up to you. Let's say in form they are DataCardValue1 and DataCardValue2.

    Now, on your all other data cards in the displaymode property write

    If(DataCardValue1.Selected.Value="Yes",DisplayMode.View,DisplayMode.Edit)

    On your toggle and date datacard display mode property write the same code as above but with DataCardValue2.

     

    Then whenever you submit a new form patch the "submitted" flag to Yes. So, in the edit form becuase of the code we wrote they will be locked. And when user submits the edit form for review patch the "review" flag to Yes. So, toggle and date field will be locked for that particular entry.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 600

#2
WarrenBelz Profile Picture

WarrenBelz 478 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard