-
Notifications
You must be signed in to change notification settings - Fork 1k
setValue throws error in document library #10624
Copy link
Copy link
Open
Labels
Needs: Author FeedbackAwaiting response from the original poster of the issue. Marked as stale if no activity for 7 days.Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days.area:list-formattingCategory: View, row & column formatting with JSONCategory: View, row & column formatting with JSONsharepoint-developer-supportsharepoint-developer-supportsharepoint-developer-supporttype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Metadata
Metadata
Assignees
Labels
Needs: Author FeedbackAwaiting response from the original poster of the issue. Marked as stale if no activity for 7 days.Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days.area:list-formattingCategory: View, row & column formatting with JSONCategory: View, row & column formatting with JSONsharepoint-developer-supportsharepoint-developer-supportsharepoint-developer-supporttype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
Site designs & site scripts
Developer environment
None
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
In a document library i have two fields.
I have added JSOn to Approv field. "Approve Button
{"$schema":"https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json","elmType":"button","txtContent":"Approve","customRowAction":{"action":"setValue","actionInput":{"ApprovalStatus":"Approved"}},"style":{"background-color":"#008000","color":"white","justify-content":"center","width":"75%","height":"80%","border-radius":"15px","box-shadow":"0 4px 8px 0 rgba(0,0,0,0.1), 0 4px 8px 0 rgba(0,0,0,0.1)"}}
"
This button click updates ApprovalStatus field sucessfully. But, getting error alert box.
Steps to reproduce
1.in document library create fields 1. Approve - Single line of text, 2. ApprovalStatus - Choice
2.In Approve field add json format code
3.Add a file and click approve button in doc library
Expected behavior
It should show success alert like updated successfully.