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 / How to hide edit butto...
Power Apps
Answered

How to hide edit button for certain rows after submitting ?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm building a survey app where user can can input data (Name,Address,Country) to a table called "Details". When a user in filling up a "NewForm" for the given table, there should be two buttons in my system, where one is "SAVE" and another is "SUBMIT". So after filling the form, if the user clicks "SAVE" the form should be editable again anytime, but once the user click "SUBMIT", it should be submitted and can never be edited again or the "EDIT" and "SAVE" button will be hidden after clicking "SUBMIT". 

Is there anyway to work around this without using COLLECTION ? 

Categories:
  • eka24 Profile Picture
    20,925 on at
    You can do this:
    1. Set a variable on the Onvisible of the
    Screen: Set(HideMyIcon,true).
    Then on Success property of the Form put: !HideMyIcon

    2. Put the name of the Variable on the visible property of the SAVE BUTTON, EDITBUTTON: !HideMyIcon

    with this the Edit Save icon would be visible after the move out of that particular screen

    If the whole thing is done in a gallery instead of a Form, then follow this tread I responded earlier :
    https://powerusers.microsoft.com/t5/Building-Power-Apps/Edit-and-save-only-selected-item-in-Gallery/m-p/478512#M144038
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to make a record non-editable by clicking "submit" button?

    Since you may create multiple records, so using variable is not enough.

    I suggest you use collection or insert another column to mark the records that you've selected "submit".

    1)use collection

    You could set the submit button's OnSelect:

    SubmitForm(Form1);Collect(collection,{record_id:Form1.LastSubmit.Id})

    set the save button's OnSelect:

    SubmitForm(Form1)

    set the save button's Visible:

    If(ThisItem.Id in collection.record_id,false,true)

    set the edit button's Visible:

    If(ThisItem.Id in collection.record_id,false,true)

    //if the record id is in the collection, then the record has been submitted. Then edit button and save button will both become invisible.

    2)insert another column

    You could set the submit button's OnSelect:

     

    SubmitForm(Form1);Patch(datasource,Form1.LastSubmit,{new field:true})

     

    set the save button's OnSelect:

     

    SubmitForm(Form1);Patch(datasource,Form1.LastSubmit,{new field:false})

     

    //the submitted record's new field value is true, others are false

    set the save button's Visible:

     

    If(ThisItem.new field=false,true,false)

     

    set the edit button's Visible:

     

    If(ThisItem.new field=false,true,false)

     

    //If the record's new field value is false, then the record has not been clicked "submit". These two buttons will be visible.

     

     

     

    Best regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard