cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kumar9024021
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
v-monli-msft
Community Support
Community Support

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
mdevaney
Super User III
Super User III

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

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

v-monli-msft
Community Support
Community Support

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (70,178)