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 / Edit Single Field on D...
Power Apps
Answered

Edit Single Field on Detail Form

(0) ShareShare
ReportReport
Posted on by 356

Good afternoon Community, 

 

I would like to click on the pencil icon and have administrators enter data into AdminNotes column in SP list.

I do not want them to be able to change any other parameters. I just want text input box txtAdminNotes to be editable.

Also, how would I patch this?

Admin Notes Capture.JPG

 

Any Ideas?

Categories:
I have the same question (0)
  • Loose Chippings Profile Picture
    185 on at

    Hi slhangen

     

    I'll put forward one way of doing this.  On the OnSelect property of the pencil icon, use UpdateContext to set a 'flag'.  Something like OnSelect: UpdateContext ({adminEdit: true}).  Then on your Administrative Notes card, set the DisplayMode property to If(adminEdit, DisplayMode.Edit, DisplayMode.View).

     

    The If statement is saying "if the flag adminEdit is true, make the Display Mode = Edit, Else, if the flag adminEdit is false, make the Display Mode = View".

     

    You can use UpdateContext ({adminEdit: !adminEdit}) to switch whether adminEdit is true or false each time the pencil is clicked, if you wish.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @slhangen 

    In the Pencil Icon OnSelect property ViewForm(FormName) but unlock the Card containing the Administrative notes and change the the Display mode property from Parent.DisplayMode to Edit.  You could add a checkmark icon with the OnSelect property SubmitForm(FormName). 

  • Loose Chippings Profile Picture
    185 on at

    Hi slhangen

     

    Following on, to Patch the SharePoint list you would use: Patch( SharePoint list name, ThisItem, {AdminNotes: 'Administrative Notes'}). Where SharePoint list name is the name of your list, ThisItem means the current selected item of your gallery, and 'AdminNotes' is the name of the column in SharePoint you are using for the Notes.

     

    I hope that is useful.

  • Verified answer
    slhangen Profile Picture
    356 on at

    Getting an invalid use of Patch error. Name isn't valid, identifier isn't recognized.

     

    Patch( 'STAFF Pre-Certification Log', ThisItem, {AdminNotes: txtAdminNotes.Text})

     

    SP column is AdminNotes, input textbox is txtAdminNotes

     

    Not sure what I am missing.

  • Verified answer
    Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    What if you try this:

     

    Patch( 'STAFF Pre-Certification Log', LookUp('STAFF Pre-Certification Log', ID = ThisItem.ID), {AdminNotes: txtAdminNotes.Text})

  • Loose Chippings Profile Picture
    185 on at

    Hi @slhangen 

     

    Your syntax is correct, so it is just a question of tracking down why you are getting the error.

    1. The first thing I would do is check the column name is really AdminNotes in SharePoint by looking at the end of the URL in SharePoint List Settings.
    2. It may depend on where you are putting the Patch statement.  If you are using a Submit button on the form, then ThisItem should work.  If the Submit button is not on the form you may need Gallery1.Selected instead.
    3. The intellisense of PowerApps is very good, so you should be able to check the validity of each stage as you go along.  My suggestions to try are:
    • Patch( 'STAFF Pre-Certification Log', Gallery1.Selected, {AdminNotes: txtAdminNotes.Text}) if the submit button is not on the form.
    • Patch( 'STAFF Pre-Certification Log', ThisItem, {AdminNotes: ThisItem.AdminNotes}) if the button is on the form or you are using the OnChange property of the text input box.
  • slhangen Profile Picture
    356 on at

    Thanks for  the insight, moved

     If("true" in valSymptoms.Text,Navigate(ScreenDenied),Navigate(ScreenCleared)) in OnSuccess of the form and it still navigates to ScreenCleared not matter what.

     

    FacePalm!

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
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard