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 / OnSelect button doesn'...
Power Apps
Answered

OnSelect button doesn't update the field value - SharePoint

(0) ShareShare
ReportReport
Posted on by 195

Hi All,

 

I have a SharePoint EditForm.aspx where I have a button called blacklist. On clicking this button, I need to set SharePoint field value to Yes.

 

Hence OnSelect for that button, I used below formula

 

Patch(SPListName,SharePointForm1_1.LastSubmit,{Blacklist_Flag:"Yes"})

 

However when i saved the Editform.aspx, my field value Blacklist_Flag doesn't get updated to Yes. It still remains blank. Any technical advice would be helpful. Thanks.

 

 

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @Kumar9024021

    Is the field Blacklist_Flag a Yes/No type field in Sharepoint?  If it is a Yes/No field you would use true to update as yes and false to update as no.

     

    Patch(SPListName,SharePointForm1_1.LastSubmit,{Blacklist_Flag:true})

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Kumar9024021 Profile Picture
    195 on at

    No. Blacklist_Flag is a text field in SharePoint. I tried this way. It doesn't work.

  • Verified answer
    v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @Kumar9024021 ,

     

    To make LastSubmit works, you must first have SubmitForm successfully run. And this property applies only to the Edit form control. That is to say, you must first have an edit form and at least submit one item with this edit form, then LastSubmit will have the fields' data of data source automatically generates. Like ID field for SharePoint list. 

     

    Did you make sure that your app meets the above requirements?

     

    Regards,

    Mona

     

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard