cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

OnSelect button doesn't update the field value - SharePoint

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: OnSelect button doesn't update the field value - SharePoint

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

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: OnSelect button doesn't update the field value - SharePoint

@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."

Highlighted
Helper V
Helper V

Re: OnSelect button doesn't update the field value - SharePoint

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

Highlighted
Community Support
Community Support

Re: OnSelect button doesn't update the field value - SharePoint

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

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,422)